mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Add check for V8 bug #2291.
Former-commit-id: 245f156a2ce1ee92c8f8f8f34b9891ba4eff0d23
This commit is contained in:
20
test/test.js
20
test/test.js
@@ -779,6 +779,26 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.isObject');
|
||||
|
||||
(function() {
|
||||
test('should avoid V8 bug #2291', function() {
|
||||
// trigger V8 bug
|
||||
// http://code.google.com/p/v8/issues/detail?id=2291
|
||||
var obj = {},
|
||||
str = 'foo';
|
||||
|
||||
// 1: Useless comparison statement, this is half the trigger
|
||||
obj == obj;
|
||||
// 2: Initial check with object, this is the other half of the trigger
|
||||
_.isObject(obj);
|
||||
|
||||
equal(_.isObject(str), false);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.isNaN');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user