mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Ensure _.isFunction returns true for generator functions. [closes #1498]
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -8549,6 +8549,16 @@
|
||||
assert.strictEqual(_.isFunction(slice), true);
|
||||
});
|
||||
|
||||
QUnit.test('should return `true` for generator functions', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var generator = _.attempt(function() {
|
||||
return Function('return function*(){}');
|
||||
});
|
||||
|
||||
assert.strictEqual(_.isFunction(generator), typeof generator == 'function');
|
||||
});
|
||||
|
||||
QUnit.test('should return `true` for typed array constructors', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user