Explorar o código

kernel: Check for Object.freeze({}).

Herbert Vojčík %!s(int64=7) %!d(string=hai) anos
pai
achega
2b123ffd85
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      support/kernel-checks.js

+ 8 - 0
support/kernel-checks.js

@@ -46,6 +46,14 @@ define(function () {
                 return this;
             }).apply(true) === true;
     });
+    assert(function () {
+        var o = Object.freeze({});
+        try {
+            o.foo = "bar";
+        } catch (ex) {
+        }
+        return o.foo == null;
+    });
     assert(function () {
         return typeof Promise === "function";
     });