mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57: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
|
'String': String.prototype
|
||||||
},
|
},
|
||||||
function(object, builtin) {
|
function(object, builtin) {
|
||||||
var keys = [];
|
var message = 'non-enumerable properties on ' + builtin + '.prototype',
|
||||||
func(object, function(value, key) { keys.push(key); });
|
props = [];
|
||||||
deepEqual(keys, [], 'non-enumerable properties on ' + builtin + '.prototype');
|
|
||||||
|
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