Debian Codegraph @

js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js

raw
1 // If Array.of tries to overwrite a non-configurable property, it throws a TypeError.
2
3 load(libdir + "asserts.js");
4
5 function C() {
6 Object.defineProperty(this, 0, {value: "v", configurable: false});
7 }
8 assertThrowsInstanceOf(() => Array.of.call(C, 1, 2, 3), TypeError);