supertape 7.3.0 → 7.4.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/ChangeLog +11 -0
- package/README.md +5 -5
- package/lib/cli.js +4 -4
- package/lib/exit-codes.js +2 -2
- package/package.json +3 -3
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Options
|
|
|
59
59
|
- `SUPERTAPE_CHECK_DUPLICATES` - toggle check duplicates;
|
|
60
60
|
- `SUPERTAPE_CHECK_SCOPES` - check that test message has a scope: `scope: subject`;
|
|
61
61
|
- `SUPERTAPE_CHECK_ASSERTIONS_COUNT` - check that assertion count is no more then 1;
|
|
62
|
-
- `
|
|
62
|
+
- `SUPERTAPE_CHECK_SKIPPED` - check that skiped count equal to `0`, exit with status code
|
|
63
63
|
|
|
64
64
|
```js
|
|
65
65
|
test('tape: error', (t) => {
|
|
@@ -267,16 +267,16 @@ test('lib: diff', (t) => {
|
|
|
267
267
|
| 2 | `WAS_STOP` | test was halted by user |
|
|
268
268
|
| 3 | `UNHANDLED`| unhandled exception occured |
|
|
269
269
|
| 4 | `INVALID_OPTION`| wrong option provided |
|
|
270
|
-
| 5 | `
|
|
270
|
+
| 5 | `SKIPPED` | works only with `SUPERTAPE_CHECK_SKIPPED` env variable when skipped files 1 and more |
|
|
271
271
|
|
|
272
272
|
Here is how exit code can look like:
|
|
273
273
|
|
|
274
274
|
```js
|
|
275
|
-
import {
|
|
275
|
+
import {SKIPPED} from 'supertape/exit-codes';
|
|
276
276
|
|
|
277
277
|
const env = {
|
|
278
|
-
ESCOVER_SUCCESS_EXIT_CODE:
|
|
279
|
-
|
|
278
|
+
ESCOVER_SUCCESS_EXIT_CODE: SKIPPED,
|
|
279
|
+
SUPERTAPE_CHECK_SKIPPED: 1,
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
export default {
|
package/lib/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ const {
|
|
|
18
18
|
WAS_STOP,
|
|
19
19
|
UNHANDLED,
|
|
20
20
|
INVALID_OPTION,
|
|
21
|
-
|
|
21
|
+
SKIPPED,
|
|
22
22
|
} = require('./exit-codes');
|
|
23
23
|
|
|
24
24
|
const {isArray} = Array;
|
|
@@ -34,7 +34,7 @@ const {
|
|
|
34
34
|
SUPERTAPE_CHECK_DUPLICATES = '1',
|
|
35
35
|
SUPERTAPE_CHECK_SCOPES = '1',
|
|
36
36
|
SUPERTAPE_CHECK_ASSERTIONS_COUNT = '1',
|
|
37
|
-
|
|
37
|
+
SUPERTAPE_CHECK_SKIPPED = '0',
|
|
38
38
|
} = process.env;
|
|
39
39
|
|
|
40
40
|
module.exports = async ({argv, cwd, stdout, stderr, exit}) => {
|
|
@@ -59,8 +59,8 @@ module.exports = async ({argv, cwd, stdout, stderr, exit}) => {
|
|
|
59
59
|
skiped,
|
|
60
60
|
} = result;
|
|
61
61
|
|
|
62
|
-
if (Number(
|
|
63
|
-
return exit(
|
|
62
|
+
if (Number(SUPERTAPE_CHECK_SKIPPED) && skiped)
|
|
63
|
+
return exit(SKIPPED);
|
|
64
64
|
|
|
65
65
|
if (failed)
|
|
66
66
|
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,6 +13,6 @@ module.exports = {
|
|
|
13
13
|
WAS_STOP,
|
|
14
14
|
UNHANDLED,
|
|
15
15
|
INVALID_OPTION,
|
|
16
|
-
|
|
16
|
+
SKIPPED,
|
|
17
17
|
};
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"deep-equal": "^2.0.3",
|
|
54
54
|
"fullstore": "^3.0.0",
|
|
55
55
|
"glob": "^7.1.6",
|
|
56
|
-
"jest-diff": "^
|
|
56
|
+
"jest-diff": "^28.1.1",
|
|
57
57
|
"once": "^1.4.0",
|
|
58
58
|
"resolve": "^1.17.0",
|
|
59
59
|
"stacktracey": "^2.1.7",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
],
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@babel/core": "^7.12.9",
|
|
77
|
-
"@iocmd/wait": "^1.0
|
|
77
|
+
"@iocmd/wait": "^2.1.0",
|
|
78
78
|
"c8": "^7.3.5",
|
|
79
79
|
"check-dts": "^0.6.5",
|
|
80
80
|
"eslint": "^8.0.0",
|