mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add _.isFunction test for its fallback.
This commit is contained in:
14
test/test.js
14
test/test.js
@@ -6498,6 +6498,20 @@
|
||||
strictEqual(_.isFunction('a'), false);
|
||||
});
|
||||
|
||||
test('should work using its fallback', 3, function() {
|
||||
var lodash = _.runInContext(_.assign({}, root, {
|
||||
'Uint8Array': {
|
||||
'toString': function() {
|
||||
return String(Uint8Array || Array);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
strictEqual(lodash.isFunction(slice), true);
|
||||
strictEqual(lodash.isFunction(/x/), false);
|
||||
strictEqual(lodash.isFunction(Uint8Array), !!Uint8Array);
|
||||
});
|
||||
|
||||
test('should work with host objects in IE 8 document mode (test in IE 11)', 2, function() {
|
||||
// trigger Chakra bug
|
||||
// https://github.com/jashkenas/underscore/issues/1621
|
||||
|
||||
Reference in New Issue
Block a user