Browse Source

Checks for Object.prototypeOf.

Herby Vojčík 6 years ago
parent
commit
28bda92660
1 changed files with 7 additions and 0 deletions
  1. 7 0
      support/kernel-checks.js

+ 7 - 0
support/kernel-checks.js

@@ -15,6 +15,13 @@ define(function () {
     assert(function () {
         return !("hasOwnProperty" in Object.create(null));
     });
+    assert(function () {
+        return Object.getPrototypeOf(Object.create(null)) === null;
+    });
+    assert(function () {
+        var p = {};
+        return Object.getPrototypeOf(Object.create(p)) === p;
+    });
     assert(function () {
         return new Function("return this")().Object === Object;
     });