diff options
Diffstat (limited to 'js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js')
-rw-r--r-- | js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js b/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js new file mode 100644 index 0000000000..476e6c7d01 --- /dev/null +++ b/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js @@ -0,0 +1,8 @@ +load(libdir + "asserts.js"); + +assertThrowsInstanceOf(_=>getWaitForAllPromise(42), Error); +assertThrowsInstanceOf(_=>getWaitForAllPromise([42]), Error); +assertThrowsInstanceOf(_=>getWaitForAllPromise([{}]), Error); + +// Shouldn't throw. +getWaitForAllPromise([Promise.resolve()]); |