From 9dd8f62c8a3c84b9b6468be919171a947a370157 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 29 May 2013 09:05:21 -0500 Subject: [PATCH] Make `Error.prototype` unit tests pass in Firefox. Former-commit-id: 1ff097e7947ba206bc58fe0c319bf36bb64b5387 --- test/test.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index 7403ed75e..f61a5fea0 100644 --- a/test/test.js +++ b/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); + } }); });