summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/node/rejection_handled_web_process.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/node/rejection_handled_web_process.ts')
-rw-r--r--cli/tests/testdata/node/rejection_handled_web_process.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/cli/tests/testdata/node/rejection_handled_web_process.ts b/cli/tests/testdata/node/rejection_handled_web_process.ts
deleted file mode 100644
index e331f8998..000000000
--- a/cli/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");
-}, 500);