GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: deflake test runner timeout coverage · nodejs/node@03656f9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • fixtures/test-runner
      • run-timeout.mjs
    • parallel
      • test-runner-run.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/fixtures/test-runner/run-timeout.mjs‎

Copy file name to clipboard
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import test, { after } from 'node:test';
2+
3+
// Keep the event loop alive until both tests time out.
4+
const interval = setInterval(() => {}, 1000);
5+
after(() => clearInterval(interval));
6+
7+
test('pending promise', () => new Promise(() => {}));
8+
9+
test('pending assertion plan', (t) => {
10+
t.plan(1, { wait: true });
11+
});
Collapse file

‎test/parallel/test-runner-run.mjs‎

Copy file name to clipboardExpand all lines: test/parallel/test-runner-run.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
8989

9090
it('should support timeout', async () => {
9191
const stream = run({ timeout: 50, files: [
92-
fixtures.path('test-runner', 'plan', 'timeout-basic.mjs'),
92+
fixtures.path('test-runner', 'run-timeout.mjs'),
9393
] });
9494
stream.on('test:fail', common.mustCall((data) => {
9595
assert.strictEqual(data.details.error.failureType, 'testTimeoutFailure');

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.