Repository navigation
testharness.js: allow_uncaught_exception in Deno - #33657
lucacasonato wants to merge 3 commits into
Conversation
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.
|
This seems reasonable to me. @zcorpan might also have an opinion. Can you push to a |
|
@jgraham Chrome and FF look fine. Safari is still running. |
jgraham
left a comment
There was a problem hiding this comment.
I didn't see anything too worrying in the Firefox results; I trust that you've checked the others.
|
Unfortunately found some tests that break (the ones checking that this error is not Going to have to figure out how to work around this. |
|
This looks ok to me, except for tests that test the observable differences as you found. You could add an opt out in Naming open for bikeshedding. But such tests would still not be able to run in Deno as-is, unless you make the non-0 status code the expected result for those tests or add some opt in to allow unhandled exceptions in Deno. |
…or_event_allow_uncaught_exception
|
Hmm, so at risk of being really bikesheddy, we are now using |
|
Wouldn't the best fix here be for Deno to have some web-like mode where non- |
|
@domenic Yeah that could work too. I'll look into that. |
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_exceptionenabled by callingpreventDefaulton errorevents when
allow_uncaught_exceptionis enabled.The primary motivator is that this would allow Deno to run
reportErrortests.