summaryrefslogtreecommitdiff
path: root/test/fixtures/wpt/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js
blob: 01f32ac9ba14962fa99d4b263a8ca0f5a0daa161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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");