summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/WeakMap-constructor-1.js
blob: ab73feb51cee9db66b2625f35b7e41429b26e1b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
// The WeakMap constructor creates an empty WeakMap by default.

load(libdir + "asserts.js");

new WeakMap();
new WeakMap(undefined);
new WeakMap(null);

assertThrowsInstanceOf(() => WeakMap(), TypeError);
assertThrowsInstanceOf(() => WeakMap(undefined), TypeError);
assertThrowsInstanceOf(() => WeakMap(null), TypeError);