mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
return result from callback
returning the result of the callback allows you to chain the promise like you would expect
This commit is contained in:
@@ -9,5 +9,13 @@ describe('helpers::spread', function () {
|
||||
|
||||
expect(value).toEqual(50);
|
||||
});
|
||||
|
||||
it('should return callback result', function () {
|
||||
var value = spread(function (a, b) {
|
||||
return a * b;
|
||||
})([5, 10]);
|
||||
|
||||
expect(value).toEqual(50);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user