diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-14 19:51:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-14 23:51:51 +0000 |
| commit | 1a788b58a0e80c4504a0fdf5d47db41c46dc8d37 (patch) | |
| tree | 4b780c3a09d92c18a381a25d7213828721c05b1f /tests/testdata | |
| parent | e389917535e8e7ef13920a96f9c9c1e1ec2b2c55 (diff) | |
chore: fix flaky rejection_handled_web_process (#23817)
Closes https://github.com/denoland/deno/issues/23712
Diffstat (limited to 'tests/testdata')
| -rw-r--r-- | tests/testdata/node/rejection_handled_web_process.ts | 26 | ||||
| -rw-r--r-- | tests/testdata/node/rejection_handled_web_process.ts.out | 6 |
2 files changed, 0 insertions, 32 deletions
diff --git a/tests/testdata/node/rejection_handled_web_process.ts b/tests/testdata/node/rejection_handled_web_process.ts deleted file mode 100644 index a5136ca3d..000000000 --- a/tests/testdata/node/rejection_handled_web_process.ts +++ /dev/null @@ -1,26 +0,0 @@ -import chalk from "npm:chalk"; -import process from "node:process"; - -console.log(chalk.red("Hello world!")); - -globalThis.addEventListener("unhandledrejection", (e) => { - console.log('globalThis.addEventListener("unhandledrejection");'); - e.preventDefault(); -}); - -globalThis.addEventListener("rejectionhandled", (_) => { - console.log("Web rejectionhandled"); -}); - -process.on("rejectionHandled", (_) => { - console.log("Node rejectionHandled"); -}); - -const a = Promise.reject(1); -setTimeout(() => { - a.catch(() => console.log("Added catch handler to the promise")); -}, 100); - -setTimeout(() => { - console.log("Success"); -}, 1000); diff --git a/tests/testdata/node/rejection_handled_web_process.ts.out b/tests/testdata/node/rejection_handled_web_process.ts.out deleted file mode 100644 index e6fefede2..000000000 --- a/tests/testdata/node/rejection_handled_web_process.ts.out +++ /dev/null @@ -1,6 +0,0 @@ -Hello world! -globalThis.addEventListener("unhandledrejection"); -Added catch handler to the promise -Web rejectionhandled -Node rejectionHandled -Success |
