diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/Tuple/prototype/slice/not-a-constructor.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/tests/non262/Tuple/prototype/slice/not-a-constructor.js b/js/src/tests/non262/Tuple/prototype/slice/not-a-constructor.js new file mode 100644 index 0000000000..ebd27dd17d --- /dev/null +++ b/js/src/tests/non262/Tuple/prototype/slice/not-a-constructor.js @@ -0,0 +1,10 @@ +// |reftest| skip-if(!this.hasOwnProperty("Tuple")) + +assertEq(isConstructor(Tuple.prototype.slice), false); + +assertThrowsInstanceOf(() => { + let t = #[1]; + new t.slice(); +}, TypeError, '`let t = #[1]; new t.slice()` throws TypeError'); + +reportCompare(0, 0); |