mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Make Error.prototype unit tests pass in Firefox.
Former-commit-id: 1ff097e7947ba206bc58fe0c319bf36bb64b5387
This commit is contained in:
17
test/test.js
17
test/test.js
@@ -1089,9 +1089,20 @@
|
||||
'String': String.prototype
|
||||
},
|
||||
function(object, builtin) {
|
||||
var keys = [];
|
||||
func(object, function(value, key) { keys.push(key); });
|
||||
deepEqual(keys, [], 'non-enumerable properties on ' + builtin + '.prototype');
|
||||
var message = 'non-enumerable properties on ' + builtin + '.prototype',
|
||||
props = [];
|
||||
|
||||
func(object, function(value, prop) {
|
||||
props.push(prop);
|
||||
});
|
||||
|
||||
if (/Error/.test(builtin)) {
|
||||
ok(_.every(['constructor', 'toString'], function(prop) {
|
||||
return !_.contains(props, prop);
|
||||
}), message);
|
||||
} else {
|
||||
deepEqual(props, [], message);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user