2
0
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:
Matt Zabriskie
2016-01-17 15:29:10 -07:00
parent be241d55df
commit b9bb6ae7aa
3 changed files with 41 additions and 6 deletions
+20
View File
@@ -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);
});
});