mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Adding support for custom adapters
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
var axios = require('../../index');
|
||||
|
||||
describe('adapter', function () {
|
||||
it('should support custom adapter', function (done) {
|
||||
var called = false;
|
||||
|
||||
axios({
|
||||
url: '/foo',
|
||||
adapter: function (resolve, reject, config) {
|
||||
called = true;
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
expect(called).toBe(true);
|
||||
done();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user