mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +03:00
16 lines
575 B
JavaScript
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');
|
|
});
|
|
});
|