Skip to content

Commit fff7f48

Browse files
aduh95targos
authored andcommitted
test: reduce flakiness of test-runner-output
PR-URL: #51952 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent fd86ea8 commit fff7f48

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

+8-2
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
return new Promise((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)