镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/parallel/test-runner-run-coverage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true },
for await (const _ of stream);
});

await it('should run with coverage and fail when below line threshold', async () => {
await it('should run with coverage and fail when below line threshold', async (t) => {
const thresholdErrors = [];
const originalExitCode = process.exitCode;
assert.notStrictEqual(originalExitCode, 1);
t.after(() => {
process.exitCode = originalExitCode;
});
process.exitCode = undefined;
const stream = run({
files,
coverage: true,
Expand All @@ -178,7 +181,6 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true },
for await (const _ of stream);
assert.deepStrictEqual(thresholdErrors.sort(), ['branch', 'function', 'line']);
assert.strictEqual(process.exitCode, 1);
process.exitCode = originalExitCode;
});
});
});
Expand Down
Loading