Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fff7f48

Browse filesBrowse 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
Copy full SHA for fff7f48

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/fixtures/test-runner/output/describe_it.js
+8-2Lines 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
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.