Skip to content

Commit

Permalink
Fix unhandledrejection tests
Browse files Browse the repository at this point in the history
They were testing an event named "onunhandledrejection", which doesn't exist, instead of "unhandledrejection".
  • Loading branch information
syvb authored and BruceDai committed Mar 25, 2024
1 parent b599240 commit 9d08b06
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Parse errors in different files should be reported " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Instantiation errors in different files should be reported " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Evaluation errors are cached in intermediate module scripts");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"network error has higher priority than parse error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"parse error has higher priority than instantiation error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"instantiation error has higher priority than evaluation error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Test that exceptions during evaluation lead to error events on " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Test that ill-founded cyclic dependencies cause ReferenceError " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Test that exceptions during evaluation lead to error events on " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
window.log = [];

window.addEventListener("error", ev => log.push(ev.error));
window.addEventListener("onunhandledrejection", unreachable);
window.addEventListener("unhandledrejection", unreachable);

const test_load = async_test(
"Test that exceptions during evaluation lead to error events on " +
Expand Down

0 comments on commit 9d08b06

Please sign in to comment.