Open Bug 1764969 Opened 3 years ago

[wpt-sync] Sync PR 33657 - testharness.js: allow_uncaught_exception in Deno

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 33657 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/33657
Details from upstream follow.

Luca Casonato <hello@lcas.dev> wrote:

testharness.js: allow_uncaught_exception in Deno

In Deno uncaught errors and unhandled rejections that are not
"preventDefault"'ed cause the runtime to exit with a non-0 status code.
Node has similar behaviour for unhandled rejections.

This commit adds support for these runtimes running tests that have
allow_uncaught_exception enabled by calling preventDefault on error
events when allow_uncaught_exception is enabled.

The primary motivator is that this would allow Deno to run reportError
tests.

You need to log in before you can comment on or make changes to this bug.