Add test for incorrectly shimmed Object.create.

This commit is contained in:
John-David Dalton
2013-10-03 09:42:32 -07:00
parent 422d7942ef
commit 49e22742de
2 changed files with 33 additions and 5 deletions

View File

@@ -24,6 +24,9 @@
Function.prototype._bind = Function.prototype.bind;
Function.prototype.bind = function() { return function() {}; };
Object._create = Object.create;
Object.create = function() {};
Object._defineProperty = Object.defineProperty;
Object.defineProperty = function() {};
@@ -48,6 +51,11 @@
} else {
delete Function.prototype.bind;
}
if (Object._create) {
Object.create = Object._create;
} else {
delete Object.create;
}
if (Object._defineProperty) {
Object.defineProperty = Object._defineProperty;
} else {
@@ -60,6 +68,7 @@
}
delete Array._isArray;
delete Function.prototype._bind;
delete Object._create;
delete Object._defineProperty;
delete Object._keys;