summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/promise/getwaitforallpromise-error-handling.js
blob: 476e6c7d014727f66ba5f976f1f7c90d9856e96a (plain)
1
2
3
4
5
6
7
8
load(libdir + "asserts.js");

assertThrowsInstanceOf(_=>getWaitForAllPromise(42), Error);
assertThrowsInstanceOf(_=>getWaitForAllPromise([42]), Error);
assertThrowsInstanceOf(_=>getWaitForAllPromise([{}]), Error);

// Shouldn't throw.
getWaitForAllPromise([Promise.resolve()]);