diff options
Diffstat (limited to 'cli/js/globals_test.ts')
-rw-r--r-- | cli/js/globals_test.ts | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/cli/js/globals_test.ts b/cli/js/globals_test.ts index d7c50c5b1..a4f12e5bd 100644 --- a/cli/js/globals_test.ts +++ b/cli/js/globals_test.ts @@ -81,22 +81,18 @@ test(async function windowQueueMicrotask(): Promise<void> { let resolve1: () => void | undefined; let resolve2: () => void | undefined; let microtaskDone = false; - const p1 = new Promise( - (res): void => { - resolve1 = (): void => { - microtaskDone = true; - res(); - }; - } - ); - const p2 = new Promise( - (res): void => { - resolve2 = (): void => { - assert(microtaskDone); - res(); - }; - } - ); + const p1 = new Promise((res): void => { + resolve1 = (): void => { + microtaskDone = true; + res(); + }; + }); + const p2 = new Promise((res): void => { + resolve2 = (): void => { + assert(microtaskDone); + res(); + }; + }); window.queueMicrotask(resolve1!); setTimeout(resolve2!, 0); await p1; |