chore: deflake rejection_handled_web_process test (#22056)

This commit is contained in:
Bartek Iwańczuk 2024-01-23 22:05:21 +01:00 committed by GitHub
parent cc05dc142d
commit ee0cfd3fd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -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,

View file

@ -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);

View file

@ -1,4 +1,3 @@
[WILDCARD]
Hello world!
globalThis.addEventListener("unhandledrejection");
Added catch handler to the promise