From 1a788b58a0e80c4504a0fdf5d47db41c46dc8d37 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 14 May 2024 19:51:51 -0400 Subject: chore: fix flaky rejection_handled_web_process (#23817) Closes https://github.com/denoland/deno/issues/23712 --- .../testdata/node/rejection_handled_web_process.ts | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 tests/testdata/node/rejection_handled_web_process.ts (limited to 'tests/testdata/node/rejection_handled_web_process.ts') 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); -- cgit v1.2.3