mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
fix(buildFullPath): handle allowAbsoluteUrls: false without baseURL (#6833)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -13,6 +13,10 @@ describe('helpers::buildFullPath', function () {
|
||||
expect(buildFullPath('https://api.github.com', 'https://api.example.com/users', false)).toBe('https://api.github.com/https://api.example.com/users');
|
||||
});
|
||||
|
||||
it('should not combine the URLs when the requestedURL is absolute, allowAbsoluteUrls is false, and the baseURL is not configured', function () {
|
||||
expect(buildFullPath(undefined, 'https://api.example.com/users', false)).toBe('https://api.example.com/users');
|
||||
});
|
||||
|
||||
it('should not combine URLs when the baseURL is not configured', function () {
|
||||
expect(buildFullPath(undefined, '/users')).toBe('/users');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user