summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/newTargetNonFunction.js
blob: 59e6febef7fd3c425fb60ff4bbc4e694ca5d8e55 (plain)
1
2
3
4
5
6
7
8
9
10
// Make sure that we can plumb new.target, even if the results are going to
// throw.

assertThrowsInstanceOf(() => new ""(...Array()), TypeError);

assertThrowsInstanceOf(() => new ""(), TypeError);
assertThrowsInstanceOf(() => new ""(1), TypeError);

if (typeof reportCompare === 'function')
    reportCompare(0,0,"OK");