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:
parent
cc05dc142d
commit
ee0cfd3fd5
3 changed files with 3 additions and 4 deletions
|
@ -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,
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue