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

load(libdir + "asserts.js");

new WeakSet();
new WeakSet(undefined);
new WeakSet(null);

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