supertape 6.10.0 → 6.11.0
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 +20 -0
- package/README.md +3 -6
- package/lib/formatter/index.js +1 -3
- package/lib/operators.mjs +3 -1
- package/lib/run-tests.js +1 -0
- package/lib/supertape.d.ts +5 -5
- package/lib/validator.js +1 -3
- package/package.json +7 -6
package/ChangeLog
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
2022.01.04, v6.11.0
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- (supertape) types: any -> unknown
|
|
5
|
+
- (@supertape/operator-stub) types: any -> unknown
|
|
6
|
+
|
|
7
|
+
feature:
|
|
8
|
+
- (package) yargs-parser v21.0.0
|
|
9
|
+
- (supertape) notOk: add ability to stringify content of passed value
|
|
10
|
+
- (package) putout v23.0.0
|
|
11
|
+
- (package) check-dts v0.6.5
|
|
12
|
+
- (package) check-dts v0.6.5
|
|
13
|
+
- (package) check-dts v0.6.5
|
|
14
|
+
- (@supertape/formatter-progress-bar) add color constant
|
|
15
|
+
- (package) eslint-plugin-putout v12.0.0
|
|
16
|
+
- (package) putout v22.0.0
|
|
17
|
+
- (package) check-dts v0.6.3
|
|
18
|
+
- (supertape) putout v21
|
|
19
|
+
|
|
20
|
+
|
|
1
21
|
2021.10.23, v6.10.0
|
|
2
22
|
|
|
3
23
|
feature:
|
package/README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
# Supertape [![NPM version][NPMIMGURL]][NPMURL] [![
|
|
1
|
+
# Supertape [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
|
|
2
2
|
|
|
3
3
|
[NPMURL]: https://npmjs.org/package/supertape "npm"
|
|
4
4
|
[NPMIMGURL]: https://img.shields.io/npm/v/supertape.svg?style=flat&longCache=true
|
|
5
5
|
[BuildStatusURL]: https://github.com/coderaiser/supertape/actions?query=workflow%3A%22Node+CI%22 "Build Status"
|
|
6
6
|
[BuildStatusIMGURL]: https://github.com/coderaiser/supertape/workflows/Node%20CI/badge.svg
|
|
7
|
-
[DependencyStatusURL]: https://david-dm.org/coderaiser/supertape?path=packages/supertape "Dependency Status"
|
|
8
|
-
[DependencyStatusIMGURL]: https://img.shields.io/david/coderaiser/supertape.svg?path=packages/supertape&style=flat&longCache=true
|
|
9
7
|
[CoverageURL]: https://coveralls.io/github/coderaiser/supertape?branch=master
|
|
10
8
|
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/supertape/badge.svg?branch=master&service=github
|
|
11
9
|
|
|
@@ -178,9 +176,8 @@ const test = require('supertape');
|
|
|
178
176
|
|
|
179
177
|
test('lib: arguments', async (t) => {
|
|
180
178
|
throw Error('hello');
|
|
181
|
-
// will call t.fail with an error
|
|
182
|
-
// will call t.end
|
|
183
|
-
|
|
179
|
+
// will call t.fail() with an error
|
|
180
|
+
// will call t.end()
|
|
184
181
|
t.end();
|
|
185
182
|
});
|
|
186
183
|
|
package/lib/formatter/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
const {EventEmitter} = require('events');
|
|
4
4
|
const {createHarness} = require('./harness');
|
|
5
5
|
|
|
6
|
-
const resolveFormatter = (name) => {
|
|
7
|
-
return require(`@supertape/formatter-${name}`);
|
|
8
|
-
};
|
|
6
|
+
const resolveFormatter = (name) => require(`@supertape/formatter-${name}`);
|
|
9
7
|
|
|
10
8
|
module.exports.createFormatter = (name) => {
|
|
11
9
|
const formatter = new EventEmitter();
|
package/lib/operators.mjs
CHANGED
|
@@ -26,7 +26,7 @@ const ok = (actual, message = 'should be truthy') => ({
|
|
|
26
26
|
const notOk = (actual, message = 'should be falsy') => ({
|
|
27
27
|
is: !actual,
|
|
28
28
|
expected: false,
|
|
29
|
-
actual,
|
|
29
|
+
actual: actual && stringify(actual),
|
|
30
30
|
message,
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -40,6 +40,8 @@ const validateRegExp = (regexp) => {
|
|
|
40
40
|
return null;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
const {stringify} = JSON;
|
|
44
|
+
|
|
43
45
|
function match(actual, regexp, message = 'should match') {
|
|
44
46
|
const error = validateRegExp(regexp);
|
|
45
47
|
|
package/lib/run-tests.js
CHANGED
|
@@ -149,6 +149,7 @@ async function runOneTest({message, at, fn, extensions, formatter, count, total,
|
|
|
149
149
|
if (!isReturn()) {
|
|
150
150
|
const [timer, stopTimer] = timeout(SUPERTAPE_TIMEOUT, ['timeout']);
|
|
151
151
|
const [error] = await Promise.race([tryToCatch(fn, t), timer]);
|
|
152
|
+
|
|
152
153
|
stopTimer();
|
|
153
154
|
isEnded(false);
|
|
154
155
|
|
package/lib/supertape.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
|
|
8
8
|
type Result = {
|
|
9
9
|
is: boolean,
|
|
10
|
-
expected:
|
|
11
|
-
actual:
|
|
10
|
+
expected: unknown,
|
|
11
|
+
actual: unknown,
|
|
12
12
|
message: string,
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
|
|
15
15
|
type Test = OperatorStub & {
|
|
16
16
|
equal: (result: unknown, expected: unknown, message?: string) => Result;
|
|
@@ -25,13 +25,13 @@ type Test = OperatorStub & {
|
|
|
25
25
|
match: (result: string, pattern: string | RegExp, message?: string) => Result;
|
|
26
26
|
notMatch: (result: string, pattern: string | RegExp, message?: string) => Result;
|
|
27
27
|
end: () => void;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
|
|
30
30
|
type TestOptions = {
|
|
31
31
|
checkAssertionsCount?: boolean,
|
|
32
32
|
checkScopes?: boolean,
|
|
33
33
|
checkDuplicates?: boolean,
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
35
|
|
|
36
36
|
declare function test(message: string, fn: (t: Test) => void, options?: TestOptions): void;
|
|
37
37
|
declare namespace test {
|
package/lib/validator.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "tape compatible test runner with superpowers",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/supertape",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"strip-ansi": "^7.0.0",
|
|
62
62
|
"try-to-catch": "^3.0.0",
|
|
63
63
|
"wraptile": "^3.0.0",
|
|
64
|
-
"yargs-parser": "^
|
|
64
|
+
"yargs-parser": "^21.0.0"
|
|
65
65
|
},
|
|
66
66
|
"keywords": [
|
|
67
67
|
"function",
|
|
@@ -77,18 +77,19 @@
|
|
|
77
77
|
"@babel/core": "^7.12.9",
|
|
78
78
|
"@iocmd/wait": "^1.0.0",
|
|
79
79
|
"c8": "^7.3.5",
|
|
80
|
-
"check-dts": "^0.
|
|
80
|
+
"check-dts": "^0.6.5",
|
|
81
81
|
"eslint": "^8.0.0-beta.0",
|
|
82
82
|
"eslint-plugin-node": "^11.1.0",
|
|
83
|
-
"eslint-plugin-putout": "^
|
|
83
|
+
"eslint-plugin-putout": "^12.0.0",
|
|
84
84
|
"madrun": "^8.0.0",
|
|
85
85
|
"mock-require": "^3.0.2",
|
|
86
86
|
"montag": "^1.0.0",
|
|
87
87
|
"nodemon": "^2.0.2",
|
|
88
88
|
"pullout": "^4.0.0",
|
|
89
|
-
"putout": "^
|
|
89
|
+
"putout": "^23.0.0",
|
|
90
90
|
"runsome": "^1.0.0",
|
|
91
|
-
"try-catch": "^3.0.0"
|
|
91
|
+
"try-catch": "^3.0.0",
|
|
92
|
+
"typescript": "^4.4.4"
|
|
92
93
|
},
|
|
93
94
|
"license": "MIT",
|
|
94
95
|
"engines": {
|