supertape 12.0.6 → 12.0.7

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,9 @@
1
+ 2026.01.09, v12.0.7
2
+
3
+ feature:
4
+ - 56d2661 supertape: createSkip, createOnly
5
+ - cd880ae supertape: createOnly, createSkip
6
+
1
7
  2026.01.08, v12.0.6
2
8
 
3
9
  feature:
package/lib/supertape.js CHANGED
@@ -8,13 +8,26 @@ const stub = require('@cloudcmd/stub');
8
8
 
9
9
  const once = require('once');
10
10
  const {maybeOnce} = require('./maybe-once');
11
-
12
11
  const options = require('../supertape.json');
13
-
14
12
  const {getAt, setValidations} = require('./validator');
15
13
 
16
14
  const {createEmitter: _createEmitter} = require('./emitter.mjs');
15
+
17
16
  const _createFormatter = require('./formatter').createFormatter;
17
+ const createOnly = (test) => (message, fn, options) => {
18
+ return test(message, fn, {
19
+ ...options,
20
+ only: true,
21
+ });
22
+ };
23
+
24
+ const createSkip = (test) => (message, fn, options) => {
25
+ return test(message, fn, {
26
+ ...options,
27
+ skip: true,
28
+ });
29
+ };
30
+
18
31
  const {env} = process;
19
32
  const {assign} = Object;
20
33
  const createEmitter = once(_createEmitter);
@@ -115,6 +128,8 @@ module.exports.createTest = async (testOptions = {}) => {
115
128
  ...test,
116
129
  extend: createExtend(fn),
117
130
  test: fn,
131
+ only: createOnly(fn),
132
+ skip: createSkip(fn),
118
133
  run: () => {
119
134
  emitter.emit('run');
120
135
  },
@@ -187,19 +202,8 @@ function test(message, fn, options = {}, overrides = {}) {
187
202
  return emitter;
188
203
  }
189
204
 
190
- test.skip = (message, fn, options) => {
191
- return test(message, fn, {
192
- ...options,
193
- skip: true,
194
- });
195
- };
196
-
197
- test.only = (message, fn, options) => {
198
- return test(message, fn, {
199
- ...options,
200
- only: true,
201
- });
202
- };
205
+ test.skip = createSkip(test);
206
+ test.only = createOnly(test);
203
207
 
204
208
  const getExtend = (test, extensions, type) => (message, fn, options) => {
205
209
  return test(message, fn, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.0.6",
3
+ "version": "12.0.7",
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",