@putout/test 15.2.0 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/bin/test.js +15 -0
- package/lib/create-error.js +7 -4
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -99,7 +99,9 @@ When you want to check that report called exact count of times pass an array of
|
|
|
99
99
|
|
|
100
100
|
```js
|
|
101
101
|
test('remove useless variables: dot', (t) => {
|
|
102
|
-
t.report('dot', [
|
|
102
|
+
t.report('dot', [
|
|
103
|
+
'Dot files should be added to .gitignore',
|
|
104
|
+
]);
|
|
103
105
|
t.end();
|
|
104
106
|
});
|
|
105
107
|
```
|
package/bin/test.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import process from 'node:process';
|
|
3
4
|
import 'supertape/bin/supertape';
|
|
5
|
+
import {callWhenTestsEnds} from 'supertape';
|
|
6
|
+
import {getCoverage} from '@putout/printer/type-checker/instrument';
|
|
7
|
+
import {report} from '@putout/printer/type-checker/report';
|
|
8
|
+
|
|
9
|
+
const {log} = console;
|
|
10
|
+
|
|
11
|
+
callWhenTestsEnds('PUTOUT_INSTRUMENT', () => {
|
|
12
|
+
const coverage = getCoverage();
|
|
13
|
+
const [code, message] = report(coverage);
|
|
14
|
+
|
|
15
|
+
log(message);
|
|
16
|
+
|
|
17
|
+
process.exitCode = code;
|
|
18
|
+
});
|
package/lib/create-error.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/test",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Test runner for 🐊Putout plugins ",
|
|
@@ -44,11 +44,14 @@
|
|
|
44
44
|
"@putout/plugin-filesystem": "*",
|
|
45
45
|
"currify": "^4.0.0",
|
|
46
46
|
"montag": "^1.2.1",
|
|
47
|
-
"putout": "*",
|
|
48
47
|
"supertape": "^12.0.0",
|
|
49
48
|
"try-catch": "^4.0.0",
|
|
50
49
|
"try-to-catch": "^4.0.0"
|
|
51
50
|
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"putout": "*",
|
|
53
|
+
"@putout/printer": "*"
|
|
54
|
+
},
|
|
52
55
|
"keywords": [
|
|
53
56
|
"putout",
|
|
54
57
|
"putout-plugin",
|