@putout/test 15.9.1 → 15.10.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 +8 -0
- package/bin/test.js +1 -11
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -23,6 +23,14 @@ UPDATE=1 tape test/*.js
|
|
|
23
23
|
|
|
24
24
|
When you need to override extension use `UPDATE_EXTENSION`, for example `UPDATE_EXTENSION=abc` will create files with extension 'abc'.
|
|
25
25
|
|
|
26
|
+
## `PUTOUT_INSTRUMENT`
|
|
27
|
+
|
|
28
|
+
When you want to check coverage of [type checkers](https://github.com/coderaiser/putout/tree/master/packages/operator-type-checker#readme) use:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
PUTOUT_INSTRUMENT=1 putout-test 'lib/**/*.spec.js`
|
|
32
|
+
```
|
|
33
|
+
|
|
26
34
|
## Plugins API
|
|
27
35
|
|
|
28
36
|
🐊**Putout** can be used in all IDE's supported by`ESLint` as [`eslint-plugin-putout`](https://github.com/coderaiser/putout/tree/packages/eslint-plugin-putout).
|
package/bin/test.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import 'supertape/bin/supertape';
|
|
4
4
|
import {callWhenTestsEnds} from 'supertape';
|
|
5
5
|
import {whenTestsEnds} from '@putout/printer/type-checker/when-tests-ends';
|
|
6
6
|
|
|
7
|
-
const {PUTOUT_INSTRUMENT} = process.env;
|
|
8
|
-
|
|
9
7
|
callWhenTestsEnds('PUTOUT_INSTRUMENT', whenTestsEnds);
|
|
10
|
-
|
|
11
|
-
// coverage of type checkers lives in the thread that creates them,
|
|
12
|
-
|
|
13
|
-
// so tests must run in the same thread as the report
|
|
14
|
-
if (PUTOUT_INSTRUMENT)
|
|
15
|
-
process.argv.push('--no-worker');
|
|
16
|
-
|
|
17
|
-
await import('supertape/bin/supertape');
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/test",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.10.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 ",
|
|
7
7
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/test#readme",
|
|
8
8
|
"main": "lib/test.js",
|
|
9
9
|
"bin": {
|
|
10
|
-
"tape": "bin/test.js"
|
|
10
|
+
"tape": "bin/test.js",
|
|
11
|
+
"putout-test": "bin/test.js"
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
14
|
".": "./lib/test.js",
|