mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Adding support for all and spread
This commit is contained in:
@@ -22,6 +22,11 @@ describe('axios', function () {
|
||||
expect(typeof axios.defaults).toEqual('object');
|
||||
expect(typeof axios.defaults.headers).toEqual('object');
|
||||
});
|
||||
|
||||
it('should have all/spread helpers', function () {
|
||||
expect(typeof axios.all).toEqual('function');
|
||||
expect(typeof axios.spread).toEqual('function');
|
||||
});
|
||||
});
|
||||
|
||||
describe('wrapper', function () {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
var spread = require('../../lib/spread');
|
||||
|
||||
module.exports = {
|
||||
testSpread: function (test) {
|
||||
var value = 0;
|
||||
spread(function (a, b) {
|
||||
value = a * b;
|
||||
})([5, 10]);
|
||||
|
||||
test.equals(value, 50);
|
||||
test.done();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user