Add this binding test for _.modArgs.

This commit is contained in:
jdalton
2015-06-02 21:04:18 -07:00
parent e062c8c6f2
commit 4beadcc4f3

View File

@@ -11377,6 +11377,17 @@
var modded = _.modArgs(fn, doubled, _.identity);
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);
});
}());
/*--------------------------------------------------------------------------*/