node/test/fixtures/wpt/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js
Joyee Cheung d20f5c7f1b
test: pull html/webappapis/microtask-queuing WPT
With the command:

```
git node wpt html/webappapis/microtask-queuing
```

PR-URL: https://github.com/nodejs/node/pull/25616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2019-01-25 00:12:11 +08:00

15 lines
317 B
JavaScript

// META: global=window,worker
"use strict";
setup({
allow_uncaught_exception: true
});
async_test(t => {
const error = new Error("boo");
self.addEventListener("error", t.step_func_done(ev => {
assert_equals(ev.error, error);
}));
queueMicrotask(() => { throw error; });
}, "It rethrows exceptions");