Avoid strict comparison to function reference in _.callback test.

This commit is contained in:
John-David Dalton
2014-04-12 23:51:55 -07:00
parent 287839e498
commit 565cc05b48

View File

@@ -1680,9 +1680,11 @@
deepEqual(actual, values);
});
test('should return `identity` when `func` is `null` or `undefined`', 2, function() {
test('should return `_.identity` when `func` is `null` or `undefined`', 2, function() {
var object = {};
_.each([null, undefined], function(value) {
strictEqual(_.callback(value), _.identity);
var callback = _.callback(value);
strictEqual(callback(object), object);
});
});