2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00
Files
axios/test/specs/helpers/combineURLs.spec.js
T
2015-11-21 17:41:02 -08:00

16 lines
575 B
JavaScript

var combineURLs = require('../../../lib/helpers/combineURLs');
describe('helpers::combineURLs', function () {
it('should combine URLs', function () {
expect(combineURLs('https://api.github.com', '/users')).toBe('https://api.github.com/users');
});
it('should remove duplicate slashes', function () {
expect(combineURLs('https://api.github.com/', '/users')).toBe('https://api.github.com/users');
});
it('should insert missing slash', function () {
expect(combineURLs('https://api.github.com', 'users')).toBe('https://api.github.com/users');
});
});