Browse Source

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

Herbert Vojčík 7 years ago
parent
commit
2b123ffd85
1 changed files with 8 additions and 0 deletions
  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";
     });