mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Axios create url bug (#2290)
* Fix #2234 * added spacing --eslint * added test cases * removed unexpected cases after updating the code
This commit is contained in:
@@ -37,6 +37,19 @@ describe('instance', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should make an http request with url instead of baseURL', function () {
|
||||
var instance = axios.create({
|
||||
url: 'https://api.example.com'
|
||||
});
|
||||
|
||||
instance('/foo');
|
||||
|
||||
getAjaxRequest().then(function (request) {
|
||||
expect(request.url).toBe('/foo');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should make an http request', function (done) {
|
||||
var instance = axios.create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user