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 +6 -0
- package/README.md +3 -1
- package/lib/call-when-tests-ends/index.js +3 -3
- package/lib/supertape.d.ts +13 -7
- package/package.json +1 -1
package/ChangeLog
CHANGED
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
|
[](https://asciinema.org/a/Cgc3rDOfZAeDnJSxzEYpPfBMY)
|
|
14
16
|
|
|
@@ -280,7 +282,7 @@ test('assertion', (t) => {
|
|
|
280
282
|
});
|
|
281
283
|
```
|
|
282
284
|
|
|
283
|
-
### `
|
|
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 '
|
|
3
|
-
import {isSkipTests as _isSkipTests} from '
|
|
4
|
-
import {isFailTests as _isFailTests} from '
|
|
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 {
|
package/lib/supertape.d.ts
CHANGED
|
@@ -38,22 +38,28 @@ export type TestOptions = {
|
|
|
38
38
|
timeout?: number;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export interface TestFunction {
|
|
42
|
-
(message: string, fn: (t:
|
|
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
|
-
|
|
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:
|
|
51
|
+
export type OperatorFactory<T extends OperatorFn = OperatorFn> = (operator: Test) => T;
|
|
51
52
|
|
|
52
53
|
export type CustomOperator = Record<string, OperatorFactory>;
|
|
53
54
|
|
|
54
|
-
|
|
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.
|
|
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",
|