summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/webapi/rejected-arg.any.js
blob: 49018db5e89eb0fa49bf9b6fa1017c9bfea7c3cd (plain)
1
2
3
4
5
6
7
8
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}`);
}