2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Moving bind into it's own file

This commit is contained in:
Matt Zabriskie
2015-12-14 20:06:16 -07:00
parent d127adfe00
commit 2b147fb0b7
2 changed files with 23 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
var bind = require('../../../lib/helpers/bind');
describe('bind', function () {
it('should bind an object to a function', function () {
var o = { val: 123 };
var f = bind(function (num) {
return this.val * num;
}, o);
expect(f(2)).toEqual(246);
});
});