0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

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 // Ensure that Web `onrejectionhandled` is fired before
// Node's `process.on('rejectionHandled')`. // Node's `process.on('rejectionHandled')`.
itest!(rejection_handled_web_process { 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", output: "node/rejection_handled_web_process.ts.out",
envs: env_vars_for_npm_tests(), envs: env_vars_for_npm_tests(),
http_server: true, http_server: true,

View file

@ -19,8 +19,8 @@ process.on("rejectionHandled", (_) => {
const a = Promise.reject(1); const a = Promise.reject(1);
setTimeout(() => { setTimeout(() => {
a.catch(() => console.log("Added catch handler to the promise")); a.catch(() => console.log("Added catch handler to the promise"));
}, 10); }, 100);
setTimeout(() => { setTimeout(() => {
console.log("Success"); console.log("Success");
}, 50); }, 500);

View file

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