supertape 6.12.1 → 6.13.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 CHANGED
@@ -1,3 +1,10 @@
1
+ 2022.01.15, v6.13.0
2
+
3
+ feature:
4
+ - (supertape) add exit code 5 for skip
5
+ - (@supertape/operator-stub) notCalled: no arg
6
+
7
+
1
8
  2022.01.14, v6.12.1
2
9
 
3
10
  fix:
package/lib/cli.js CHANGED
@@ -18,6 +18,7 @@ const {
18
18
  WAS_STOP,
19
19
  UNHANDLED,
20
20
  INVALID_OPTION,
21
+ SKIP,
21
22
  } = require('./exit-codes');
22
23
 
23
24
  const {isArray} = Array;
@@ -51,6 +52,7 @@ module.exports = async ({argv, cwd, stdout, stderr, exit}) => {
51
52
 
52
53
  const {
53
54
  failed,
55
+ skiped,
54
56
  code,
55
57
  message,
56
58
  } = result;
@@ -64,8 +66,13 @@ module.exports = async ({argv, cwd, stdout, stderr, exit}) => {
64
66
  return exit(code);
65
67
  }
66
68
 
67
- if (isStop())
69
+ if (isStop()) {
68
70
  return exit(WAS_STOP);
71
+ }
72
+
73
+ if (skiped) {
74
+ return exit(SKIP);
75
+ }
69
76
 
70
77
  return exit(OK);
71
78
  };
@@ -175,13 +182,16 @@ async function cli({argv, cwd, stdout, isStop}) {
175
182
  filesCount(files.length);
176
183
 
177
184
  if (!promises.length)
178
- return OK;
185
+ return {
186
+ failed: false,
187
+ };
179
188
 
180
189
  await Promise.all(promises);
181
- const [{failed}] = await once(supertape.run(), 'end');
190
+ const [{failed, skiped}] = await once(supertape.run(), 'end');
182
191
 
183
192
  return {
184
193
  failed,
194
+ skiped,
185
195
  };
186
196
  }
187
197
 
package/lib/exit-codes.js CHANGED
@@ -5,6 +5,7 @@ const FAIL = 1;
5
5
  const WAS_STOP = 2;
6
6
  const UNHANDLED = 3;
7
7
  const INVALID_OPTION = 4;
8
+ const SKIP = 5;
8
9
 
9
10
  module.exports = {
10
11
  OK,
@@ -12,5 +13,6 @@ module.exports = {
12
13
  WAS_STOP,
13
14
  UNHANDLED,
14
15
  INVALID_OPTION,
16
+ SKIP,
15
17
  };
16
18
 
package/lib/supertape.js CHANGED
@@ -68,13 +68,13 @@ function _createEmitter({quiet, format, getOperators, isStop}) {
68
68
  harness.pipe(stdout);
69
69
 
70
70
  const operators = await getOperators();
71
- const {failed} = await runTests(tests, {
71
+ const {failed, skiped} = await runTests(tests, {
72
72
  formatter,
73
73
  operators,
74
74
  isStop,
75
75
  });
76
76
 
77
- emitter.emit('end', {failed});
77
+ emitter.emit('end', {failed, skiped});
78
78
  });
79
79
 
80
80
  return emitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "6.12.1",
3
+ "version": "6.13.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "📼 Supertape fastest simplest test runner with lots of formatters",
6
6
  "homepage": "http://github.com/coderaiser/supertape",