| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1182ad8 commit 3229886
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,10 +154,13 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true }, | |||
| 154 | 154 | for await (const _ of stream); | |
| 155 | 155 | }); | |
| 156 | 156 | ||
| 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) => { | ||
| 158 | 158 | const thresholdErrors = []; | |
| 159 | 159 | const originalExitCode = process.exitCode; | |
| 160 | - assert.notStrictEqual(originalExitCode, 1); | ||
| 160 | + t.after(() => { | ||
| 161 | + process.exitCode = originalExitCode; | ||
| 162 | + }); | ||
| 163 | + process.exitCode = undefined; | ||
| 161 | 164 | const stream = run({ | |
| 162 | 165 | files, | |
| 163 | 166 | coverage: true, | |
@@ -178,7 +181,6 @@ describe('require(\'node:test\').run coverage settings', { concurrency: true }, | |||
| 178 | 181 | for await (const _ of stream); | |
| 179 | 182 | assert.deepStrictEqual(thresholdErrors.sort(), ['branch', 'function', 'line']); | |
| 180 | 183 | assert.strictEqual(process.exitCode, 1); | |
| 181 | - process.exitCode = originalExitCode; | ||
| 182 | 184 | }); | |
| 183 | 185 | }); | |
| 184 | 186 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments