Skip to content

Commit

Permalink
test: reduce flakiness of test-runner-output
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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>
  • Loading branch information
aduh95 authored and rdw-msft committed Mar 26, 2024
1 parent 2d1ebcd commit 437f4e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/fixtures/test-runner/output/describe_it.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,18 @@ describe('describe async throw fails', async () => {
describe('timeouts', () => {
it('timed out async test', { timeout: 5 }, async () => {
return new Promise((resolve) => {
setTimeout(resolve, 100);
setTimeout(() => {
// Empty timer so the process doesn't exit before the timeout triggers.
}, 5);
setTimeout(resolve, 30_000_000).unref();
});
});

it('timed out callback test', { timeout: 5 }, (t, done) => {
setTimeout(done, 100);
setTimeout(() => {
// Empty timer so the process doesn't exit before the timeout triggers.
}, 5);
setTimeout(done, 30_000_000).unref();
});


Expand Down

0 comments on commit 437f4e6

Please sign in to comment.