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 13d004c commit 0ccea6bCopy full SHA for 0ccea6b
1 file changed
packages/plugin-printer/test/type-check-coverage.js
@@ -1,15 +1,15 @@
1
import process from 'node:process';
2
-import {isOnlyTests} from 'supertape';
+import {callWhenTestsEnds} from 'supertape';
3
import {getCoverage} from '@putout/printer/type-checker/instrument';
4
import {report} from '@putout/printer/type-checker/report';
5
6
-if (process.env.PUTOUT_INSTRUMENT)
7
- process.on('exit', () => {
8
- if (isOnlyTests())
9
- return;
10
-
11
- const coverage = getCoverage();
12
- const [code] = report(coverage);
13
14
- process.exitCode = code;
15
- });
+const {log} = console;
+
+callWhenTestsEnds('PUTOUT_INSTRUMENT', () => {
+ const coverage = getCoverage();
+ const [code, message] = report(coverage);
+ log(message);
+ process.exitCode = code;
+});
0 commit comments