supertape 12.10.2 → 12.10.3

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,8 @@
1
+ 2026.03.11, v12.10.3
2
+
3
+ feature:
4
+ - 1495bec supertape: improve types: only, skip
5
+
1
6
  2026.03.11, v12.10.2
2
7
 
3
8
  feature:
@@ -38,22 +38,24 @@ export type TestOptions = {
38
38
  timeout?: number;
39
39
  };
40
40
 
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
- }
41
+ export type TestFunction<T extends Test = Test> =
42
+ ((message: string, fn: (t: T) => void, options?: TestOptions) => void) & {
43
+ skip: TestFunction<T>;
44
+ only: TestFunction<T>;
45
+ };
46
46
 
47
47
  export let test: TestFunction<Test>;
48
48
 
49
49
  export default test;
50
50
 
51
- export type OperatorFactory<T extends OperatorFn = OperatorFn> = (operator: Test) => T;
51
+ export type OperatorFactory<
52
+ T extends (...args: any[]) => OperationResult = (...args: any[]) => OperationResult,
53
+ > = (operator: Test) => T;
52
54
 
53
55
  export type CustomOperator = Record<string, OperatorFactory>;
54
56
 
55
57
  type OperatorsToMethods<T extends CustomOperator> = {
56
- [K in keyof T]: ReturnType<T[K]>;
58
+ [K in keyof T]: T[K] extends (...args: any[]) => infer R ? R : never;
57
59
  };
58
60
 
59
61
  export declare function extend<T extends CustomOperator>(operators: T): TestFunction<Test & OperatorsToMethods<T>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.10.2",
3
+ "version": "12.10.3",
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",