mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Fix unit test for rhino/ringo.
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -1741,13 +1741,18 @@
|
||||
|
||||
(function() {
|
||||
test('should create a callback with a falsey `thisArg`', 1, function() {
|
||||
var fn = function() { return this; };
|
||||
|
||||
var expected = _.map(falsey, function(value) {
|
||||
return Object(value == null ? root : value);
|
||||
var result = fn.call(value);
|
||||
return (result && result.Array) ? root : result;
|
||||
});
|
||||
|
||||
var actual = _.map(falsey, function(value) {
|
||||
var callback = _.callback(function() { return this; }, value);
|
||||
return callback();
|
||||
var callback = _.callback(fn, value),
|
||||
result = callback();
|
||||
|
||||
return (result && result.Array) ? root : result;
|
||||
});
|
||||
|
||||
ok(_.isEqual(actual, expected));
|
||||
|
||||
Reference in New Issue
Block a user