Skip to content

Commit 97e6cef

Browse files
committed
fix: supertape: skipped
1 parent 0bc2e17 commit 97e6cef

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

packages/supertape/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,16 @@ test('lib: diff', (t) => {
282282
| 2 | `WAS_STOP` | test was halted by user |
283283
| 3 | `UNHANDLED`| unhandled exception occurred |
284284
| 4 | `INVALID_OPTION`| wrong option provided |
285-
| 5 | `SKIPED` | works only with `SUPERTAPE_CHECK_SKIPED` env variable when skipped files 1 and more |
285+
| 5 | `SKIPPED` | works only with `SUPERTAPE_CHECK_SKIPPED` env variable when skipped files 1 and more |
286286

287287
Here is how exit code can look like:
288288

289289
```js
290-
import {SKIPED} from 'supertape/exit-codes';
290+
import {SKIPPED} from 'supertape/exit-codes';
291291

292292
const env = {
293-
ESCOVER_SUCCESS_EXIT_CODE: SKIPED,
294-
SUPERTAPE_CHECK_SKIPED: 1,
293+
ESCOVER_SUCCESS_EXIT_CODE: SKIPPED,
294+
SUPERTAPE_CHECK_SKIPPED: 1,
295295
};
296296

297297
export default {

packages/supertape/lib/cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const {
1919
WAS_STOP,
2020
UNHANDLED,
2121
INVALID_OPTION,
22-
SKIPED,
22+
SKIPPED,
2323
} = require('./exit-codes');
2424

2525
const isExclude = (a) => !a.includes('node_modules');
@@ -28,7 +28,7 @@ const removeDuplicates = (a) => Array.from(new Set(a));
2828
const filesCount = fullstore(0);
2929

3030
const {
31-
SUPERTAPE_CHECK_SKIPED = '0',
31+
SUPERTAPE_CHECK_SKIPPED = '0',
3232
} = process.env;
3333

3434
module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatter}) => {
@@ -55,8 +55,8 @@ module.exports = async ({argv, cwd, stdout, stderr, exit, isStop, workerFormatte
5555
skipped,
5656
} = result;
5757

58-
if (Number(SUPERTAPE_CHECK_SKIPED) && skipped)
59-
return exit(SKIPED);
58+
if (Number(SUPERTAPE_CHECK_SKIPPED) && skipped)
59+
return exit(SKIPPED);
6060

6161
if (failed)
6262
return exit(FAIL);

packages/supertape/lib/cli.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const test = require('./supertape.js');
1717
const {
1818
OK,
1919
WAS_STOP,
20-
SKIPED,
20+
SKIPPED,
2121
UNHANDLED,
2222
} = require('./exit-codes');
2323

@@ -303,7 +303,7 @@ test('supertape: cli: exit: skipped', async (t) => {
303303
run,
304304
});
305305

306-
process.env.SUPERTAPE_CHECK_SKIPED = '1';
306+
process.env.SUPERTAPE_CHECK_SKIPPED = '1';
307307
mockRequire('..', test);
308308

309309
const emit = emitter.emit.bind(emitter);
@@ -318,9 +318,9 @@ test('supertape: cli: exit: skipped', async (t) => {
318318
]);
319319

320320
stopAll();
321-
delete process.env.SUPERTAPE_CHECK_SKIPED;
321+
delete process.env.SUPERTAPE_CHECK_SKIPPED;
322322

323-
t.calledWith(exit, [SKIPED], 'should call exit with SKIPED');
323+
t.calledWith(exit, [SKIPPED], 'should call exit with SKIPPED');
324324
t.end();
325325
});
326326

packages/supertape/lib/exit-codes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ const FAIL = 1;
55
const WAS_STOP = 2;
66
const UNHANDLED = 3;
77
const INVALID_OPTION = 4;
8-
const SKIPED = 5;
8+
const SKIPPED = 5;
99

1010
module.exports = {
1111
OK,
1212
FAIL,
1313
WAS_STOP,
1414
UNHANDLED,
1515
INVALID_OPTION,
16-
SKIPED,
16+
SKIPPED,
1717
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {test} from 'supertape';
22

33
test('supertape: exit-codes', async (t) => {
4-
const {SKIPED} = await import('supertape/exit-codes');
4+
const {SKIPPED} = await import('supertape/exit-codes');
55
const Original = await import('./exit-codes.js');
66

7-
t.equal(Original.SKIPED, SKIPED);
7+
t.equal(Original.SKIPPED, SKIPPED);
88
t.end();
99
});

packages/supertape/lib/run-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ module.exports = async (tests, {formatter, operators, isStop}) => {
4141
isStop,
4242
});
4343

44-
const notSkipedTests = tests.filter(notSkip);
44+
const notSkippedTests = tests.filter(notSkip);
4545
const skipped = tests.filter(isSkip).length;
4646

47-
return await runTests(notSkipedTests, {
47+
return await runTests(notSkippedTests, {
4848
formatter,
4949
operators,
5050
skipped,

0 commit comments

Comments
 (0)