mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Add this binding test for _.modArgs.
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -11377,6 +11377,17 @@
|
|||||||
var modded = _.modArgs(fn, doubled, _.identity);
|
var modded = _.modArgs(fn, doubled, _.identity);
|
||||||
deepEqual(modded(5), [10]);
|
deepEqual(modded(5), [10]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should not set a `this` binding', 1, function() {
|
||||||
|
var modded = _.modArgs(function(x) {
|
||||||
|
return this[x];
|
||||||
|
}, function(x) {
|
||||||
|
return this === x;
|
||||||
|
});
|
||||||
|
|
||||||
|
var object = { 'modded': modded, 'false': 1 };
|
||||||
|
strictEqual(object.modded(object), 1);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user