1
0
Pārlūkot izejas kodu

Checks for Object.prototypeOf.

Herby Vojčík 6 gadi atpakaļ
vecāks
revīzija
28bda92660
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  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;
     });