blob: b8ab1b1cbef9367480b1366daae2e6edde31bd04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
let newTarget = Object.defineProperty(function () {}.bind(), "prototype", {
get() {
throw 0;
}
});
try {
Reflect.construct(FinalizationRegistry, [ 1 ], newTarget);
} catch (n) {
assertEq(n === 0, false);
assertEq(n instanceof TypeError, true);
}
|