supertape 12.10.1 → 12.10.2

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.03.11, v12.10.2
2
+
3
+ feature:
4
+ - a04f888 supertape: types: improve inference of skyp/only
5
+ - 0461099 supertape: callWhenTestsEnds: exclude failed
6
+
1
7
  2026.03.09, v12.10.1
2
8
 
3
9
  feature:
package/README.md CHANGED
@@ -9,6 +9,8 @@
9
9
  [CoverageIMGURL]: https://coveralls.io/repos/coderaiser/supertape/badge.svg?branch=master&service=github
10
10
  [MITLicenseURL]: https://opensource.org/licenses/MIT
11
11
  [MITLicenseIMGURL]: https://img.shields.io/badge/License-MIT-green.svg
12
+ [DeepScanURL]: https://deepscan.io/dashboard#view=project&tid=16903&pid=20212&bid=545568
13
+ [DeepScanIMGURL]: https://deepscan.io/api/teams/16903/projects/20212/branches/545568/badge/grade.svg
12
14
 
13
15
  [![supertape](https://asciinema.org/a/Cgc3rDOfZAeDnJSxzEYpPfBMY.svg)](https://asciinema.org/a/Cgc3rDOfZAeDnJSxzEYpPfBMY)
14
16
 
@@ -280,7 +282,7 @@ test('assertion', (t) => {
280
282
  });
281
283
  ```
282
284
 
283
- ### `isSkiptTests`
285
+ ### `isOnlyTests`
284
286
 
285
287
  When you need to know if there was `only` tests use:
286
288
 
@@ -1,7 +1,7 @@
1
1
  import _process from 'node:process';
2
- import {isOnlyTests as _isOnlyTests} from './is-only-tests.js';
3
- import {isSkipTests as _isSkipTests} from './is-skip-tests.js';
4
- import {isFailTests as _isFailTests} from './is-fail-tests.js';
2
+ import {isOnlyTests as _isOnlyTests} from '#is-only-tests';
3
+ import {isSkipTests as _isSkipTests} from '#is-skip-tests';
4
+ import {isFailTests as _isFailTests} from '#is-fail-tests';
5
5
 
6
6
  export function callWhenTestsEnds(name, fn, overrides = {}) {
7
7
  const {
@@ -38,22 +38,28 @@ export type TestOptions = {
38
38
  timeout?: number;
39
39
  };
40
40
 
41
- export interface TestFunction {
42
- (message: string, fn: (t: Test) => void, options?: TestOptions): void;
43
- skip: TestFunction;
44
- only: TestFunction;
41
+ export interface TestFunction<T extends Test = Test> {
42
+ (message: string, fn: (t: T) => void, options?: TestOptions): void;
43
+ skip: TestFunction<T>;
44
+ only: TestFunction<T>;
45
45
  }
46
- export let test: TestFunction;
46
+
47
+ export let test: TestFunction<Test>;
47
48
 
48
49
  export default test;
49
50
 
50
- export type OperatorFactory<T extends OperatorFn = OperatorFn> = (operator: Operator) => T;
51
+ export type OperatorFactory<T extends OperatorFn = OperatorFn> = (operator: Test) => T;
51
52
 
52
53
  export type CustomOperator = Record<string, OperatorFactory>;
53
54
 
54
- export declare function extend(operators: CustomOperator): TestFunction;
55
+ type OperatorsToMethods<T extends CustomOperator> = {
56
+ [K in keyof T]: ReturnType<T[K]>;
57
+ };
58
+
59
+ export declare function extend<T extends CustomOperator>(operators: T): TestFunction<Test & OperatorsToMethods<T>>;
55
60
 
56
61
  export let isOnlyTests: () => boolean;
57
62
  export let isSkipTests: () => boolean;
58
63
  export let isFailTests: () => boolean;
64
+
59
65
  export let callWhenTestsEnds: (name: string, fn: () => number | void) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.10.1",
3
+ "version": "12.10.2",
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",