2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Fixing #385 - Keep defaults local to instance

This commit is contained in:
Martti Laine
2018-03-01 23:53:38 +02:00
parent 604e8dd860
commit 5bfd2ea9f6
5 changed files with 87 additions and 9 deletions
+2 -2
View File
@@ -148,14 +148,14 @@ describe('defaults', function () {
});
});
it('should be used by custom instance if set after instance created', function (done) {
it('should not be used by custom instance if set after instance created', function (done) {
var instance = axios.create();
axios.defaults.baseURL = 'http://example.org/';
instance.get('/foo');
getAjaxRequest().then(function (request) {
expect(request.url).toBe('http://example.org/foo');
expect(request.url).toBe('/foo');
done();
});
});