supertape 11.0.3 → 11.0.4
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/ChangeLog +5 -0
- package/README.md +4 -4
- package/lib/cli.js +4 -4
- package/lib/exit-codes.js +2 -2
- package/lib/run-tests.js +2 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -282,16 +282,16 @@ test('lib: diff', (t) => {
|
|
|
282
282
|
| 2 | `WAS_STOP` | test was halted by user |
|
|
283
283
|
| 3 | `UNHANDLED`| unhandled exception occurred |
|
|
284
284
|
| 4 | `INVALID_OPTION`| wrong option provided |
|
|
285
|
-
| 5 | `
|
|
285
|
+
| 5 | `SKIPPED` | works only with `SUPERTAPE_CHECK_SKIPPED` env variable when skipped files 1 and more |
|
|
286
286
|
|
|
287
287
|
Here is how exit code can look like:
|
|
288
288
|
|
|
289
289
|
```js
|
|
290
|
-
import {
|
|
290
|
+
import {SKIPPED} from 'supertape/exit-codes';
|
|
291
291
|
|
|
292
292
|
const env = {
|
|
293
|
-
ESCOVER_SUCCESS_EXIT_CODE:
|
|
294
|
-
|
|
293
|
+
ESCOVER_SUCCESS_EXIT_CODE: SKIPPED,
|
|
294
|
+
SUPERTAPE_CHECK_SKIPPED: 1,
|
|
295
295
|
};
|
|
296
296
|
|
|
297
297
|
export default {
|
package/lib/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ const {
|
|
|
19
19
|
WAS_STOP,
|
|
20
20
|
UNHANDLED,
|
|
21
21
|
INVALID_OPTION,
|
|
22
|
-
|
|
22
|
+
SKIPPED,
|
|
23
23
|
} = require('./exit-codes');
|
|
24
24
|
|
|
25
25
|
const isExclude = (a) => !a.includes('node_modules');
|
|
@@ -28,7 +28,7 @@ const removeDuplicates = (a) => Array.from(new Set(a));
|
|
|
28
28
|
const filesCount = fullstore(0);
|
|
29
29
|
|
|
30
30
|
const {
|
|
31
|
-
|
|
31
|
+
SUPERTAPE_CHECK_SKIPPED = '0',
|
|
32
32
|
} = process.env;
|
|
33
33
|
|
|
34
34
|
module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatter}) => {
|
|
@@ -55,8 +55,8 @@ module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatte
|
|
|
55
55
|
skipped,
|
|
56
56
|
} = result;
|
|
57
57
|
|
|
58
|
-
if (Number(
|
|
59
|
-
return exit(
|
|
58
|
+
if (Number(SUPERTAPE_CHECK_SKIPPED) && skipped)
|
|
59
|
+
return exit(SKIPPED);
|
|
60
60
|
|
|
61
61
|
if (failed)
|
|
62
62
|
return exit(FAIL);
|
package/lib/exit-codes.js
CHANGED
|
@@ -5,7 +5,7 @@ const FAIL = 1;
|
|
|
5
5
|
const WAS_STOP = 2;
|
|
6
6
|
const UNHANDLED = 3;
|
|
7
7
|
const INVALID_OPTION = 4;
|
|
8
|
-
const
|
|
8
|
+
const SKIPPED = 5;
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
OK,
|
|
@@ -13,5 +13,5 @@ module.exports = {
|
|
|
13
13
|
WAS_STOP,
|
|
14
14
|
UNHANDLED,
|
|
15
15
|
INVALID_OPTION,
|
|
16
|
-
|
|
16
|
+
SKIPPED,
|
|
17
17
|
};
|
package/lib/run-tests.js
CHANGED
|
@@ -41,10 +41,10 @@ module.exports = async (tests, {formatter, operators, isStop}) => {
|
|
|
41
41
|
isStop,
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const notSkippedTests = tests.filter(notSkip);
|
|
45
45
|
const skipped = tests.filter(isSkip).length;
|
|
46
46
|
|
|
47
|
-
return await runTests(
|
|
47
|
+
return await runTests(notSkippedTests, {
|
|
48
48
|
formatter,
|
|
49
49
|
operators,
|
|
50
50
|
skipped,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.4",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "📼 Supertape simplest high speed test runner with superpowers",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/supertape",
|