diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/regexp/RegExpExec-errors.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/regexp/RegExpExec-errors.js b/js/src/jit-test/tests/regexp/RegExpExec-errors.js new file mode 100644 index 0000000000..bee579859f --- /dev/null +++ b/js/src/jit-test/tests/regexp/RegExpExec-errors.js @@ -0,0 +1,6 @@ +load(libdir + "asserts.js"); + +assertErrorMessage(() => RegExp.prototype.test.call({}), TypeError, + /test method called on incompatible Object/); +assertErrorMessage(() => RegExp.prototype[Symbol.match].call([]), TypeError, + /\[Symbol\.match\] method called on incompatible Array/); |