We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76e755c commit cba472bCopy full SHA for cba472b
1 file changed
test/type-check-coverage.js
@@ -1,16 +1,12 @@
1
-import process from 'node:process';
2
-import {isOnlyTests} from 'supertape';
+import {callWhenTestsEnds} from 'supertape';
3
import {getCoverage} from '#type-checker/instrument';
4
import {report} from '#type-checker/report';
5
6
-if (process.env.TYPE_CHECK)
7
- process.on('exit', () => {
8
- if (isOnlyTests())
9
- return;
10
-
11
- const coverage = getCoverage();
12
- const [code, output] = report(coverage);
13
14
- console.log(output);
15
- process.exitCode = code;
16
- });
+callWhenTestsEnds('TYPE_CHECK', () => {
+ const coverage = getCoverage();
+ const [code, output] = report(coverage);
+
+ console.log(output);
+ return code;
+});
0 commit comments