diff options
Diffstat (limited to 'testing/web-platform/tests/wasm/webapi/rejected-arg.any.js')
-rw-r--r-- | testing/web-platform/tests/wasm/webapi/rejected-arg.any.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/wasm/webapi/rejected-arg.any.js b/testing/web-platform/tests/wasm/webapi/rejected-arg.any.js new file mode 100644 index 0000000000..49018db5e8 --- /dev/null +++ b/testing/web-platform/tests/wasm/webapi/rejected-arg.any.js @@ -0,0 +1,9 @@ +// META: global=window,worker + +for (const method of ["compileStreaming", "instantiateStreaming"]) { + promise_test(t => { + const error = { "name": "custom error" }; + const promise = Promise.reject(error); + return promise_rejects_exactly(t, error, WebAssembly[method](promise)); + }, `${method}`); +} |