mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
committed by
Nick Uraltsev
parent
2e949495f0
commit
0d9996b1a0
+4
-1
@@ -78,7 +78,10 @@ Axios.prototype.request = function request(config) {
|
|||||||
|
|
||||||
var defaultInstance = new Axios(defaults);
|
var defaultInstance = new Axios(defaults);
|
||||||
var axios = module.exports = bind(Axios.prototype.request, defaultInstance);
|
var axios = module.exports = bind(Axios.prototype.request, defaultInstance);
|
||||||
module.exports.Axios = Axios;
|
axios.request = bind(Axios.prototype.request, defaultInstance);
|
||||||
|
|
||||||
|
// Expose Axios class to allow class inheritance
|
||||||
|
axios.Axios = Axios;
|
||||||
|
|
||||||
// Expose properties from defaultInstance
|
// Expose properties from defaultInstance
|
||||||
axios.defaults = defaultInstance.defaults;
|
axios.defaults = defaultInstance.defaults;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
describe('static api', function () {
|
describe('static api', function () {
|
||||||
it('should have request method helpers', function () {
|
it('should have request method helpers', function () {
|
||||||
|
expect(typeof axios.request).toEqual('function');
|
||||||
expect(typeof axios.get).toEqual('function');
|
expect(typeof axios.get).toEqual('function');
|
||||||
expect(typeof axios.head).toEqual('function');
|
expect(typeof axios.head).toEqual('function');
|
||||||
expect(typeof axios.delete).toEqual('function');
|
expect(typeof axios.delete).toEqual('function');
|
||||||
|
|||||||
Reference in New Issue
Block a user