diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-23 22:05:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 21:05:21 +0000 |
commit | ee0cfd3fd55910d3d8e8f802ec6401942dc71d5f (patch) | |
tree | 796868827e88c8a23ea9ee3528abf0b2fd3fd197 | |
parent | cc05dc142d1c57afd10cb08d84f99a25bd49678c (diff) |
chore: deflake rejection_handled_web_process test (#22056)
-rw-r--r-- | cli/tests/integration/node_unit_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/testdata/node/rejection_handled_web_process.ts | 4 | ||||
-rw-r--r-- | cli/tests/testdata/node/rejection_handled_web_process.ts.out | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/cli/tests/integration/node_unit_tests.rs b/cli/tests/integration/node_unit_tests.rs index 351bf1eec..680d4018b 100644 --- a/cli/tests/integration/node_unit_tests.rs +++ b/cli/tests/integration/node_unit_tests.rs @@ -197,7 +197,7 @@ itest!(unhandled_rejection_web_process { // Ensure that Web `onrejectionhandled` is fired before // Node's `process.on('rejectionHandled')`. itest!(rejection_handled_web_process { - args: "run -A node/rejection_handled_web_process.ts", + args: "run -A --quiet node/rejection_handled_web_process.ts", output: "node/rejection_handled_web_process.ts.out", envs: env_vars_for_npm_tests(), http_server: true, diff --git a/cli/tests/testdata/node/rejection_handled_web_process.ts b/cli/tests/testdata/node/rejection_handled_web_process.ts index 00d943feb..e331f8998 100644 --- a/cli/tests/testdata/node/rejection_handled_web_process.ts +++ b/cli/tests/testdata/node/rejection_handled_web_process.ts @@ -19,8 +19,8 @@ process.on("rejectionHandled", (_) => { const a = Promise.reject(1); setTimeout(() => { a.catch(() => console.log("Added catch handler to the promise")); -}, 10); +}, 100); setTimeout(() => { console.log("Success"); -}, 50); +}, 500); diff --git a/cli/tests/testdata/node/rejection_handled_web_process.ts.out b/cli/tests/testdata/node/rejection_handled_web_process.ts.out index 3a4e2ac23..e6fefede2 100644 --- a/cli/tests/testdata/node/rejection_handled_web_process.ts.out +++ b/cli/tests/testdata/node/rejection_handled_web_process.ts.out @@ -1,4 +1,3 @@ -[WILDCARD] Hello world! globalThis.addEventListener("unhandledrejection"); Added catch handler to the promise |