We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 997ccef commit 6255301Copy full SHA for 6255301
packages/svelte/tests/runtime-legacy/shared.ts
@@ -450,10 +450,11 @@ async function run_test_variant(
450
'Expected component to unmount and leave nothing behind after it was destroyed'
451
);
452
453
- // TODO: This seems useless, unhandledRejection is only triggered on the next task
454
- // by which time the test has already finished and the next test resets it to null above
+ // uncaught errors like during template effects flush
455
if (unhandled_rejection) {
456
- throw unhandled_rejection; // eslint-disable-line no-unsafe-finally
+ if (!config.expect_unhandled_rejections) {
+ throw unhandled_rejection; // eslint-disable-line no-unsafe-finally
457
+ }
458
}
459
460
0 commit comments