Skip to content

Commit 60f008b

Browse files
aduh95richardlau
authored andcommitted
test: reduce flakiness of test-runner-output
PR-URL: #51952 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 9f5547a commit 60f008b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎test/fixtures/test-runner/output/describe_it.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,18 @@ describe('describe async throw fails', async () =>{
302302
describe('timeouts',()=>{
303303
it('timed out async test',{timeout: 5},async()=>{
304304
returnnewPromise((resolve)=>{
305-
setTimeout(resolve,100);
305+
setTimeout(()=>{
306+
// Empty timer so the process doesn't exit before the timeout triggers.
307+
},5);
308+
setTimeout(resolve,30_000_000).unref();
306309
});
307310
});
308311

309312
it('timed out callback test',{timeout: 5},(t,done)=>{
310-
setTimeout(done,100);
313+
setTimeout(()=>{
314+
// Empty timer so the process doesn't exit before the timeout triggers.
315+
},5);
316+
setTimeout(done,30_000_000).unref();
311317
});
312318

313319

0 commit comments

Comments
(0)