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: fix flaky test-runner coverage threshold test · nodejs/node@3229886

File tree

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

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

Copy file name to clipboardExpand all lines: test/parallel/test-runner-run-coverage.mjs
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,13 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true },
154154
for await (const _ of stream);
155155
});
156156

157-
await it('should run with coverage and fail when below line threshold', async () => {
157+
await it('should run with coverage and fail when below line threshold', async (t) => {
158158
const thresholdErrors = [];
159159
const originalExitCode = process.exitCode;
160-
assert.notStrictEqual(originalExitCode, 1);
160+
t.after(() => {
161+
process.exitCode = originalExitCode;
162+
});
163+
process.exitCode = undefined;
161164
const stream = run({
162165
files,
163166
coverage: true,
@@ -178,7 +181,6 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true },
178181
for await (const _ of stream);
179182
assert.deepStrictEqual(thresholdErrors.sort(), ['branch', 'function', 'line']);
180183
assert.strictEqual(process.exitCode, 1);
181-
process.exitCode = originalExitCode;
182184
});
183185
});
184186
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.