Make Error.prototype unit tests pass in Firefox.

Former-commit-id: 1ff097e7947ba206bc58fe0c319bf36bb64b5387
This commit is contained in:
John-David Dalton
2013-05-29 09:05:21 -05:00
parent 1db19148e7
commit 9dd8f62c8a

View File

@@ -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);
}
});
});