@putout/plugin-tape 17.0.0 → 18.0.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/lib/add-args/index.js +12 -4
- package/lib/add-await-to-re-import/index.js +4 -5
- package/lib/add-node-prefix-to-mock-require/index.js +5 -7
- package/lib/add-stop-all/index.js +9 -16
- package/lib/add-t-end/index.js +11 -13
- package/lib/apply-destructuring/index.js +4 -5
- package/lib/apply-stub/index.js +4 -6
- package/lib/apply-with-name/index.js +4 -6
- package/lib/convert-called-with-args/index.js +4 -5
- package/lib/convert-called-with-no-args-to-called-with/index.js +2 -4
- package/lib/convert-called-with-to-called-with-no-args/index.js +2 -4
- package/lib/convert-deep-equal-to-equal/index.js +4 -6
- package/lib/convert-does-not-throw-to-try-catch/index.js +3 -4
- package/lib/convert-emitter-to-promise/index.js +11 -13
- package/lib/convert-equal-to-called-once/index.js +2 -4
- package/lib/convert-equal-to-deep-equal/index.js +4 -5
- package/lib/convert-equal-to-not-ok/index.js +4 -6
- package/lib/convert-equal-to-ok/index.js +4 -6
- package/lib/convert-equals-to-equal/index.js +2 -4
- package/lib/convert-match-regexp-to-string/index.js +4 -5
- package/lib/convert-mock-require-to-mock-import/index.js +3 -5
- package/lib/convert-ok-to-called-with/index.js +3 -4
- package/lib/convert-ok-to-match/index.js +3 -5
- package/lib/convert-tape-to-supertape/index.js +2 -4
- package/lib/convert-throws-to-try-catch/index.js +3 -4
- package/lib/declare/index.js +1 -3
- package/lib/index.js +38 -41
- package/lib/jest/index.js +2 -4
- package/lib/remove-default-messages/index.js +2 -4
- package/lib/remove-only/index.js +3 -5
- package/lib/remove-skip/index.js +4 -5
- package/lib/remove-stop-all/index.js +8 -11
- package/lib/remove-useless-not-called-args/index.js +2 -4
- package/lib/remove-useless-t-end/index.js +6 -7
- package/lib/switch-expected-with-result/index.js +2 -4
- package/lib/sync-with-name/index.js +3 -5
- package/lib/test-signatures.js +6 -8
- package/package.json +7 -8
package/lib/add-args/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {operator} = require('putout');
|
|
4
3
|
const {addArgs} = operator;
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const {
|
|
5
|
+
report,
|
|
6
|
+
fix,
|
|
7
|
+
traverse,
|
|
8
|
+
} = addArgs({
|
|
7
9
|
t: ['t', [
|
|
8
10
|
'test("__a", (__args) => __body)',
|
|
9
11
|
'test("__a", async (__args) => __body)',
|
|
@@ -13,3 +15,9 @@ module.exports = addArgs({
|
|
|
13
15
|
'test.skip("__a", async (__args) => __body)',
|
|
14
16
|
]],
|
|
15
17
|
});
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
report,
|
|
21
|
+
fix,
|
|
22
|
+
traverse,
|
|
23
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import {types} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {types} = require('putout');
|
|
4
3
|
const {isFunction} = types;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => `Call 'reImport()' using await`;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const match = () => ({
|
|
9
8
|
'reImport(__a)': (vars, path) => {
|
|
10
9
|
const {parentPath} = path;
|
|
11
10
|
|
|
@@ -13,7 +12,7 @@ module.exports.match = () => ({
|
|
|
13
12
|
},
|
|
14
13
|
});
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
export const replace = () => ({
|
|
17
16
|
'reImport(__a)': (vars, path) => {
|
|
18
17
|
const fnPath = path.findParent(isFunction);
|
|
19
18
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {isBuiltin} = require('node:module');
|
|
4
|
-
const {operator, types} = require('putout');
|
|
1
|
+
import {isBuiltin} from 'node:module';
|
|
2
|
+
import {operator, types} from 'putout';
|
|
5
3
|
|
|
6
4
|
const {isStringLiteral} = types;
|
|
7
5
|
const {
|
|
@@ -9,16 +7,16 @@ const {
|
|
|
9
7
|
setLiteralValue,
|
|
10
8
|
} = operator;
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
export const report = ({__a}) => `Add 'node:' prefix: '${__a.value}' -> 'node:${__a.value}'`;
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
export const fix = ({__a}) => {
|
|
15
13
|
setLiteralValue(__a, `node:${__a.value}`);
|
|
16
14
|
};
|
|
17
15
|
|
|
18
16
|
const MOCK_REQUIRE = 'mockRequire(__a, __b)';
|
|
19
17
|
const MOCK_IMPORT = 'mockImport(__a, __b)';
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
export const traverse = ({push}) => ({
|
|
22
20
|
[MOCK_REQUIRE]: createTraverser(push, MOCK_REQUIRE),
|
|
23
21
|
[MOCK_IMPORT]: createTraverser(push, MOCK_IMPORT),
|
|
24
22
|
});
|
|
@@ -1,38 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {
|
|
1
|
+
import {
|
|
4
2
|
types,
|
|
5
3
|
operator,
|
|
6
4
|
template,
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const {
|
|
5
|
+
} from 'putout';
|
|
6
|
+
import {
|
|
10
7
|
TEST,
|
|
11
8
|
TEST_ONLY,
|
|
12
9
|
TEST_SKIP,
|
|
13
10
|
TEST_ASYNC,
|
|
14
11
|
TEST_ASYNC_ONLY,
|
|
15
12
|
TEST_ASYNC_SKIP,
|
|
16
|
-
}
|
|
13
|
+
} from '../test-signatures.js';
|
|
17
14
|
|
|
18
|
-
const {
|
|
19
|
-
traverse,
|
|
20
|
-
compare,
|
|
21
|
-
insertBefore,
|
|
22
|
-
} = operator;
|
|
15
|
+
const {compare, insertBefore} = operator;
|
|
23
16
|
|
|
24
17
|
const {expressionStatement} = types;
|
|
25
18
|
|
|
26
|
-
|
|
19
|
+
export const report = () => `Call 'stopAll()' at the end of test when 'mockImport()' used`;
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
export const fix = (path) => {
|
|
29
22
|
const assertionPath = getAssertionsPath(path);
|
|
30
23
|
const stopAllNode = template.ast('stopAll()');
|
|
31
24
|
|
|
32
25
|
insertBefore(assertionPath, expressionStatement(stopAllNode));
|
|
33
26
|
};
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
export const traverse = ({push}) => ({
|
|
36
29
|
[TEST]: createTraverse(push),
|
|
37
30
|
[TEST_ONLY]: createTraverse(push),
|
|
38
31
|
[TEST_SKIP]: createTraverse(push),
|
|
@@ -65,7 +58,7 @@ function check(path) {
|
|
|
65
58
|
let hasMockImport = false;
|
|
66
59
|
let hasAssertions = false;
|
|
67
60
|
|
|
68
|
-
traverse(path, {
|
|
61
|
+
operator.traverse(path, {
|
|
69
62
|
'mockImport(__a, __b)': () => {
|
|
70
63
|
hasMockImport = true;
|
|
71
64
|
},
|
package/lib/add-t-end/index.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {
|
|
1
|
+
import {
|
|
4
2
|
types,
|
|
5
3
|
template,
|
|
6
4
|
operator,
|
|
7
|
-
}
|
|
5
|
+
} from 'putout';
|
|
8
6
|
|
|
9
7
|
const {compare, traverse} = operator;
|
|
10
8
|
const {expressionStatement} = types;
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
export const report = () => `'t.end()' is missing at the end of the test`;
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
'test(__a, (t) => __body)':
|
|
16
|
-
'test(__a, async (t) => __body)':
|
|
12
|
+
export const match = () => ({
|
|
13
|
+
'test(__a, (t) => __body)': check,
|
|
14
|
+
'test(__a, async (t) => __body)': check,
|
|
17
15
|
});
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
'test(__a, (t) => __body)':
|
|
21
|
-
'test(__a, async (t) => __body)':
|
|
17
|
+
export const replace = () => ({
|
|
18
|
+
'test(__a, (t) => __body)': transform,
|
|
19
|
+
'test(__a, async (t) => __body)': transform,
|
|
22
20
|
});
|
|
23
21
|
|
|
24
|
-
function
|
|
22
|
+
function check({__body}, path) {
|
|
25
23
|
const {body} = __body;
|
|
26
24
|
const {length} = body;
|
|
27
25
|
|
|
@@ -49,7 +47,7 @@ function match({__body}, path) {
|
|
|
49
47
|
return !found;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
function
|
|
50
|
+
function transform({__body}, path) {
|
|
53
51
|
__body.body.push(expressionStatement(template.ast('t.end()')));
|
|
54
52
|
return path;
|
|
55
53
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {operator} = require('putout');
|
|
4
3
|
const {remove} = operator;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => `Use destructuring when using 'stub()' in 'test()'`;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const match = () => ({
|
|
9
8
|
'const test = require("supertape")': (vars, path) => path.scope.bindings.stub,
|
|
10
9
|
});
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
export const replace = () => ({
|
|
13
12
|
'const test = require("supertape")': (vars, path) => {
|
|
14
13
|
remove(path.scope.bindings.stub.path);
|
|
15
14
|
return 'const {test, stub} = require("supertape")';
|
package/lib/apply-stub/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {template, types} = require('putout');
|
|
1
|
+
import {template, types} from 'putout';
|
|
4
2
|
|
|
5
3
|
const {
|
|
6
4
|
isUnaryExpression,
|
|
@@ -10,9 +8,9 @@ const {
|
|
|
10
8
|
|
|
11
9
|
const REJECTS = template('stub().rejects(A)');
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
export const report = () => `Use 'stub()' instead of creating a function`;
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
export const match = () => ({
|
|
16
14
|
'async () => __a': ({__a}, path) => {
|
|
17
15
|
if (!path.parentPath.isVariableDeclarator())
|
|
18
16
|
return false;
|
|
@@ -27,7 +25,7 @@ module.exports.match = () => ({
|
|
|
27
25
|
},
|
|
28
26
|
});
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
export const replace = () => ({
|
|
31
29
|
'async () => __a': ({__a}) => {
|
|
32
30
|
if (isUnaryExpression(__a, {operator: 'throw'}))
|
|
33
31
|
return REJECTS({
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {template, operator} = require('putout');
|
|
1
|
+
import {template, operator} from 'putout';
|
|
4
2
|
|
|
5
3
|
const {replaceWith} = operator;
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
export const report = () => `'stub().withName()' should be used`;
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
export const match = () => ({
|
|
10
8
|
't.calledBefore(__a, __b)': checkStubs,
|
|
11
9
|
't.calledAfter(__a, __b)': checkStubs,
|
|
12
10
|
't.calledInOrder(__array)': checkStubsArray,
|
|
13
11
|
});
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
export const replace = () => ({
|
|
16
14
|
't.calledBefore(__a, __b)': applyWithName,
|
|
17
15
|
't.calledAfter(__a, __b)': applyWithName,
|
|
18
16
|
't.calledInOrder(__array)': applyWithNameToArray,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import {types} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {types} = require('putout');
|
|
4
3
|
const {
|
|
5
4
|
isIdentifier,
|
|
6
5
|
isArrayExpression,
|
|
7
6
|
} = types;
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
export const report = () => `Use an array as args to 'calledWith()'`;
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
export const match = () => ({
|
|
12
11
|
't.calledWith(__a, __b)': ({__b}) => {
|
|
13
12
|
if (isIdentifier(__b))
|
|
14
13
|
return false;
|
|
@@ -17,7 +16,7 @@ module.exports.match = () => ({
|
|
|
17
16
|
},
|
|
18
17
|
});
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
export const replace = () => ({
|
|
21
20
|
't.calledWith(__a, __b)': 't.calledWith(__a, [__b])',
|
|
22
21
|
't.calledWith(__a, [...__b], __c)': 't.calledWith(__a, __b, __c)',
|
|
23
22
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => '"calledWithArgs" should be used when arguments are present';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.calledWithNoArgs(__a, __array)': 't.calledWith(__a, __array)',
|
|
7
5
|
't.calledWithNoArgs(__a, __array, __b)': 't.calledWith(__a, __array, __b)',
|
|
8
6
|
't.calledWithNoArgs(__a, __identifier)': 't.calledWith(__a, __identifier)',
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => `Use 'calledWithNoArgs()' when arguments are absent`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.calledWith(__a)': 't.calledWithNoArgs(__a)',
|
|
7
5
|
't.calledWith(__a, [])': 't.calledWithNoArgs(__a)',
|
|
8
6
|
't.calledWith(__a, [], __b)': 't.calledWithNoArgs(__a, __b)',
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {types, operator} = require('putout');
|
|
1
|
+
import {types, operator} from 'putout';
|
|
4
2
|
|
|
5
3
|
const isNull = (a) => !a && typeof a === 'object';
|
|
6
4
|
const isUndefined = (a) => typeof a === 'undefined';
|
|
@@ -16,7 +14,7 @@ const {
|
|
|
16
14
|
isIdentifier,
|
|
17
15
|
} = types;
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
export const report = (path) => {
|
|
20
18
|
const args = path.get('arguments');
|
|
21
19
|
|
|
22
20
|
if (args.length === 2)
|
|
@@ -45,12 +43,12 @@ const check = ({__b}, path) => {
|
|
|
45
43
|
return is && isPrimitive(value);
|
|
46
44
|
};
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
export const match = () => ({
|
|
49
47
|
't.deepEqual(__a, __b)': check,
|
|
50
48
|
't.deepEqual(__a, __b, __c)': check,
|
|
51
49
|
});
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
export const replace = () => ({
|
|
54
52
|
't.deepEqual(__a, __b)': 't.equal(__a, __b)',
|
|
55
53
|
't.deepEqual(__a, __b, __c)': 't.equal(__a, __b, __c)',
|
|
56
54
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import {template, operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {template, operator} = require('putout');
|
|
4
3
|
const {insertBefore} = operator;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => 'try-catch should be used instead of t.doesNotThrow';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const replace = () => ({
|
|
9
8
|
't.doesNotThrow(__a, __b)': ({__a}, path) => {
|
|
10
9
|
const tryCatchNode = template.ast.fresh(`
|
|
11
10
|
const [error] = tryCatch(__a)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {
|
|
1
|
+
import {
|
|
4
2
|
generate,
|
|
5
3
|
operator,
|
|
6
4
|
template,
|
|
7
5
|
types,
|
|
8
|
-
}
|
|
6
|
+
} from 'putout';
|
|
9
7
|
|
|
10
8
|
const {
|
|
11
9
|
compare,
|
|
@@ -22,19 +20,19 @@ const onceEnd = template(`await once(%%emitter%%, 'end')`);
|
|
|
22
20
|
const onceError = template(`const [%%error%%] = await once(%%emitter%%, 'error')`);
|
|
23
21
|
const onceAnyNoResult = template(`await once(%%emitter%%, %%event%%)`);
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
export const report = () => '"await once" should be used';
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
'test(__a, (__args) => __body)':
|
|
29
|
-
'test(__a, async (__args) => __body)':
|
|
25
|
+
export const match = () => ({
|
|
26
|
+
'test(__a, (__args) => __body)': doMatch,
|
|
27
|
+
'test(__a, async (__args) => __body)': doMatch,
|
|
30
28
|
});
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
'test(__a, (__args) => __body)':
|
|
34
|
-
'test(__a, async (__args) => __body)':
|
|
30
|
+
export const replace = () => ({
|
|
31
|
+
'test(__a, (__args) => __body)': doReplace,
|
|
32
|
+
'test(__a, async (__args) => __body)': doReplace,
|
|
35
33
|
});
|
|
36
34
|
|
|
37
|
-
function
|
|
35
|
+
function doMatch({__body}) {
|
|
38
36
|
for (const codeLine of __body.body) {
|
|
39
37
|
const {
|
|
40
38
|
expression = codeLine,
|
|
@@ -53,7 +51,7 @@ function match({__body}) {
|
|
|
53
51
|
return false;
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
function
|
|
54
|
+
function doReplace({__a}, path) {
|
|
57
55
|
declareOnce(path);
|
|
58
56
|
|
|
59
57
|
const arg = path.get('arguments.1').node;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
module.exports.report = (path) => {
|
|
1
|
+
export const report = (path) => {
|
|
4
2
|
const arg = path.get('arguments.0');
|
|
5
3
|
return `Use 't.calledOnce(${arg.get('object')})' instead of '${path}'`;
|
|
6
4
|
};
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
export const replace = () => ({
|
|
9
7
|
't.equal(__a.callCount, 1)': 't.calledOnce(__a)',
|
|
10
8
|
't.equal(__a.callCount, 1, __b)': 't.calledOnce(__a, __b)',
|
|
11
9
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import {types, operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {types, operator} = require('putout');
|
|
4
3
|
const {compare} = operator;
|
|
5
4
|
const {
|
|
6
5
|
isArrayExpression,
|
|
@@ -8,14 +7,14 @@ const {
|
|
|
8
7
|
isObjectExpression,
|
|
9
8
|
} = types;
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
export const report = () => `Use 't.deepEqual()' when comparing Objects an Arrays`;
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
export const match = () => ({
|
|
14
13
|
't.equal(__a, __b)': check,
|
|
15
14
|
't.notEqual(__a, __b)': check,
|
|
16
15
|
});
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
export const replace = () => ({
|
|
19
18
|
't.equal(__a, __b)': 't.deepEqual(__a, __b)',
|
|
20
19
|
't.notEqual(__a, __b)': 't.notDeepEqual(__a, __b)',
|
|
21
20
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {operator, types} = require('putout');
|
|
1
|
+
import {operator, types} from 'putout';
|
|
4
2
|
|
|
5
3
|
const isNumber = (a) => typeof a === 'number';
|
|
6
4
|
const isString = (a) => typeof a === 'string';
|
|
@@ -13,12 +11,12 @@ const {
|
|
|
13
11
|
isNumericLiteral,
|
|
14
12
|
} = types;
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
export const report = (path) => {
|
|
17
15
|
const arg = path.get('arguments.0');
|
|
18
16
|
return `Use 't.notOk(${arg})' instead of '${path}'`;
|
|
19
17
|
};
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
export const match = () => ({
|
|
22
20
|
't.equal(__a, __b)': ({__b}, path) => {
|
|
23
21
|
if (isBooleanLiteral(__b, {value: false}))
|
|
24
22
|
return true;
|
|
@@ -47,7 +45,7 @@ module.exports.match = () => ({
|
|
|
47
45
|
},
|
|
48
46
|
});
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
export const replace = () => ({
|
|
51
49
|
't.equal(__a, __b)': 't.notOk(__a)',
|
|
52
50
|
't.equal(__a, null, __b)': 't.notOk(__a, __b)',
|
|
53
51
|
't.equal(__a, false, __b)': 't.notOk(__a, __b)',
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {operator, types} = require('putout');
|
|
1
|
+
import {operator, types} from 'putout';
|
|
4
2
|
|
|
5
3
|
const isBool = (a) => typeof a === 'boolean';
|
|
6
4
|
const {compute} = operator;
|
|
7
5
|
const {isBooleanLiteral} = types;
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
export const report = (path) => {
|
|
10
8
|
const arg = path.get('arguments.0');
|
|
11
9
|
return `Use 't.ok(${arg})' instead of '${path}'`;
|
|
12
10
|
};
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
export const match = () => ({
|
|
15
13
|
't.equal(__a, __b)': ({__b}, path) => {
|
|
16
14
|
if (isBooleanLiteral(__b, {value: true}))
|
|
17
15
|
return true;
|
|
@@ -25,7 +23,7 @@ module.exports.match = () => ({
|
|
|
25
23
|
},
|
|
26
24
|
});
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
export const replace = () => ({
|
|
29
27
|
't.equal(__a, __b)': 't.ok(__a)',
|
|
30
28
|
't.equal(__a, true, __b)': 't.ok(__a, __b)',
|
|
31
29
|
't.deepEqual(__a, true)': 't.ok(__a)',
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => `Use 't.equal()' instead of 't.equals()''`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.equals(__a, __b, __c)': 't.equal(__a, __b, __c)',
|
|
7
5
|
});
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {operator} = require('putout');
|
|
4
3
|
const {isSimpleRegExp} = operator;
|
|
5
4
|
const checkRegExp = ({__b}) => isSimpleRegExp(RegExp(__b.pattern));
|
|
6
5
|
const checkStr = ({__b}) => isSimpleRegExp(RegExp(__b.value));
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const report = () => 't.match should be used with string pattern';
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
export const match = () => ({
|
|
11
10
|
't.match(__a, RegExp(__b))': checkStr,
|
|
12
11
|
't.match(__a, RegExp(__b), __c)': checkStr,
|
|
13
12
|
't.match(__a, /__b/)': checkRegExp,
|
|
@@ -18,7 +17,7 @@ module.exports.match = () => ({
|
|
|
18
17
|
't.notMatch(__a, /__b/, __c)': checkRegExp,
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
export const replace = () => ({
|
|
22
21
|
't.match(__a, RegExp(__b))': 't.match(__a, __b)',
|
|
23
22
|
't.match(__a, RegExp(__b), __c)': 't.match(__a, __b, __c)',
|
|
24
23
|
't.match(__a, /__b/)': ({__b}) => `t.match(__a, '${__b.pattern}')`,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {operator, template} = require('putout');
|
|
1
|
+
import {operator, template} from 'putout';
|
|
4
2
|
|
|
5
3
|
const {
|
|
6
4
|
remove,
|
|
@@ -10,9 +8,9 @@ const {
|
|
|
10
8
|
|
|
11
9
|
const initStopAll = template.ast(`const {stopAll} = createMockImport(import.meta.url)`);
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
export const report = () => '"mockImport" should be used instead of "mockRequire"';
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
export const replace = () => ({
|
|
16
14
|
'mockRequire(__a, __b)': 'mockImport(__a, __b)',
|
|
17
15
|
'reRequire(__a)': (vars, path) => {
|
|
18
16
|
const {scope} = path;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {operator} = require('putout');
|
|
4
3
|
const {compare} = operator;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = (path) => {
|
|
7
6
|
if (compare(path, 't.ok(__args)'))
|
|
8
7
|
return `Use 't.calledWith()' instead of 't.ok()'`;
|
|
9
8
|
|
|
10
9
|
return `Use 't.notCalledWith()' instead of 't.notOk()'`;
|
|
11
10
|
};
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
export const replace = () => ({
|
|
14
13
|
't.ok(__a.calledWith(__args))': 't.calledWith(__a, [__args])',
|
|
15
14
|
't.ok(__a.calledWith(__args), __b)': 't.calledWith(__a, [__args], __b)',
|
|
16
15
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => `Use 't.match()' instead of 't.ok()'`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.exclude = () => [
|
|
3
|
+
export const exclude = () => [
|
|
6
4
|
't.ok(keys(__a).includes(__b))',
|
|
7
5
|
];
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
export const replace = () => ({
|
|
10
8
|
't.ok(__a.includes(__b))': 't.match(__a, __b)',
|
|
11
9
|
't.ok(__a.includes(__b), __c)': 't.match(__a, __b, __c)',
|
|
12
10
|
't.ok(__a.test(__b))': 't.match(__b, __a)',
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => '"supertape" should be used';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
'const tryTo = __': '',
|
|
7
5
|
'const tryToTape = __': '',
|
|
8
6
|
'tryTo(__a)': '__a',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import {template, operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {template, operator} = require('putout');
|
|
4
3
|
const {insertBefore} = operator;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => 'try-catch should be used instead of t.throws';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const replace = () => ({
|
|
9
8
|
't.throws(__a, __b)': ({__a}, path) => {
|
|
10
9
|
putTryCatch(__a, path);
|
|
11
10
|
return `t.ok(error, __b)`;
|
package/lib/declare/index.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,49 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
import * as applyStub from './apply-stub/index.js';
|
|
2
|
+
import * as applyDestructuring from './apply-destructuring/index.js';
|
|
3
|
+
import * as applyWithName from './apply-with-name/index.js';
|
|
4
|
+
import * as addAwaitToReImport from './add-await-to-re-import/index.js';
|
|
5
|
+
import * as jest from './jest/index.js';
|
|
6
|
+
import * as syncWithName from './sync-with-name/index.js';
|
|
7
|
+
import * as convertTapeToSupertape from './convert-tape-to-supertape/index.js';
|
|
8
|
+
import * as convertThrowsToTryCatch from './convert-throws-to-try-catch/index.js';
|
|
9
|
+
import * as convertDoesNotThrowToTryCatch from './convert-does-not-throw-to-try-catch/index.js';
|
|
10
|
+
import * as convertCalledWithToCalledWithNoArgs from './convert-called-with-to-called-with-no-args/index.js';
|
|
11
|
+
import * as convertCalledWithArgs from './convert-called-with-args/index.js';
|
|
12
|
+
import * as convertCalledWithNoArgsToCalledWith from './convert-called-with-no-args-to-called-with/index.js';
|
|
13
|
+
import * as convertEmitterToPromise from './convert-emitter-to-promise/index.js';
|
|
14
|
+
import * as convertOkToMatch from './convert-ok-to-match/index.js';
|
|
15
|
+
import * as convertOkToCalledWith from './convert-ok-to-called-with/index.js';
|
|
16
|
+
import * as convertMatchRegexpToString from './convert-match-regexp-to-string/index.js';
|
|
17
|
+
import * as convertEqualToNotOk from './convert-equal-to-not-ok/index.js';
|
|
18
|
+
import * as convertEqualToDeepEqual from './convert-equal-to-deep-equal/index.js';
|
|
19
|
+
import * as convertEqualToOk from './convert-equal-to-ok/index.js';
|
|
20
|
+
import * as convertEqualToCalledOnce from './convert-equal-to-called-once/index.js';
|
|
21
|
+
import * as convertDeepEqualToEqual from './convert-deep-equal-to-equal/index.js';
|
|
22
|
+
import * as convertMockRequireToMockImport from './convert-mock-require-to-mock-import/index.js';
|
|
23
|
+
import * as addArgs from './add-args/index.js';
|
|
24
|
+
import * as declare from './declare/index.js';
|
|
25
|
+
import * as removeDefaultMessages from './remove-default-messages/index.js';
|
|
26
|
+
import * as removeUselessNotCalledArgs from './remove-useless-not-called-args/index.js';
|
|
27
|
+
import * as switchExpectedWithResult from './switch-expected-with-result/index.js';
|
|
28
|
+
import * as addTEnd from './add-t-end/index.js';
|
|
29
|
+
import * as addStopAll from './add-stop-all/index.js';
|
|
30
|
+
import * as removeStopAll from './remove-stop-all/index.js';
|
|
31
|
+
import * as removeUselessTEnd from './remove-useless-t-end/index.js';
|
|
32
|
+
import * as removeOnly from './remove-only/index.js';
|
|
33
|
+
import * as removeSkip from './remove-skip/index.js';
|
|
34
|
+
import * as convertEqualsToEqual from './convert-equals-to-equal/index.js';
|
|
35
|
+
import * as addNodePrefixToMockRequire from './add-node-prefix-to-mock-require/index.js';
|
|
2
36
|
|
|
3
|
-
const
|
|
4
|
-
const applyDestructuring = require('./apply-destructuring');
|
|
5
|
-
const applyWithName = require('./apply-with-name');
|
|
6
|
-
const addAwaitToReImport = require('./add-await-to-re-import');
|
|
7
|
-
const jest = require('./jest');
|
|
8
|
-
const syncWithName = require('./sync-with-name');
|
|
9
|
-
const convertTapeToSupertape = require('./convert-tape-to-supertape');
|
|
10
|
-
const convertThrowsToTryCatch = require('./convert-throws-to-try-catch');
|
|
11
|
-
const convertDoesNotThrowToTryCatch = require('./convert-does-not-throw-to-try-catch');
|
|
12
|
-
const convertCalledWithToCalledWithNoArgs = require('./convert-called-with-to-called-with-no-args');
|
|
13
|
-
const convertCalledWithArgs = require('./convert-called-with-args');
|
|
14
|
-
const convertCalledWithNoArgsToCalledWith = require('./convert-called-with-no-args-to-called-with');
|
|
15
|
-
const convertEmitterToPromise = require('./convert-emitter-to-promise');
|
|
16
|
-
const convertOkToMatch = require('./convert-ok-to-match');
|
|
17
|
-
const convertOkToCalledWith = require('./convert-ok-to-called-with');
|
|
18
|
-
const convertMatchRegexpToString = require('./convert-match-regexp-to-string');
|
|
19
|
-
const convertEqualToNotOk = require('./convert-equal-to-not-ok');
|
|
20
|
-
const convertEqualToDeepEqual = require('./convert-equal-to-deep-equal');
|
|
21
|
-
const convertEqualToOk = require('./convert-equal-to-ok');
|
|
22
|
-
const convertEqualToCalledOnce = require('./convert-equal-to-called-once');
|
|
23
|
-
const convertDeepEqualToEqual = require('./convert-deep-equal-to-equal');
|
|
24
|
-
const convertMockRequireToMockImport = require('./convert-mock-require-to-mock-import');
|
|
25
|
-
const addArgs = require('./add-args');
|
|
26
|
-
const declare = require('./declare');
|
|
27
|
-
const removeDefaultMessages = require('./remove-default-messages');
|
|
28
|
-
const removeUselessNotCalledArgs = require('./remove-useless-not-called-args');
|
|
29
|
-
const switchExpectedWithResult = require('./switch-expected-with-result');
|
|
30
|
-
const addTEnd = require('./add-t-end');
|
|
31
|
-
const addStopAll = require('./add-stop-all');
|
|
32
|
-
const removeStopAll = require('./remove-stop-all');
|
|
33
|
-
const removeUselessTEnd = require('./remove-useless-t-end');
|
|
34
|
-
const removeOnly = require('./remove-only');
|
|
35
|
-
const removeSkip = require('./remove-skip');
|
|
36
|
-
const convertEqualsToEqual = require('./convert-equals-to-equal');
|
|
37
|
-
const addNodePrefixToMockRequire = require('./add-node-prefix-to-mock-require');
|
|
38
|
-
|
|
39
|
-
module.exports.rules = {
|
|
37
|
+
export const rules = {
|
|
40
38
|
'convert-mock-require-to-mock-import': ['off', convertMockRequireToMockImport],
|
|
41
|
-
|
|
42
39
|
'apply-stub': applyStub,
|
|
43
40
|
'apply-destructuring': applyDestructuring,
|
|
44
41
|
'apply-with-name': applyWithName,
|
|
45
42
|
'add-await-to-re-import': addAwaitToReImport,
|
|
46
|
-
jest,
|
|
43
|
+
'jest': jest,
|
|
47
44
|
'sync-with-name': syncWithName,
|
|
48
45
|
'convert-tape-to-supertape': convertTapeToSupertape,
|
|
49
46
|
'convert-throws-to-try-catch': convertThrowsToTryCatch,
|
|
@@ -62,7 +59,7 @@ module.exports.rules = {
|
|
|
62
59
|
'convert-equals-to-equal': convertEqualsToEqual,
|
|
63
60
|
'convert-deep-equal-to-equal': convertDeepEqualToEqual,
|
|
64
61
|
'add-args': addArgs,
|
|
65
|
-
declare,
|
|
62
|
+
'declare': declare,
|
|
66
63
|
'remove-default-messages': removeDefaultMessages,
|
|
67
64
|
'remove-useless-not-called-args': removeUselessNotCalledArgs,
|
|
68
65
|
'switch-expected-with-result': switchExpectedWithResult,
|
package/lib/jest/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export const report = () => `Use 📼 Supertape instead of 🃏Jest`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
'it': 'test',
|
|
7
5
|
'expect(__a).toEqual(__b)': 't.equal(__a, __b)',
|
|
8
6
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => 'Avoid passing default messages to operators';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.ok(__a, "should be truthy")': 't.ok(__a)',
|
|
7
5
|
't.notOk(__a, "should be falsy")': 't.notOk(__a)',
|
|
8
6
|
't.match(__a, __b, "should match")': 't.match(__a, __b)',
|
package/lib/remove-only/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
export const report = () => `Remove 'test.only'`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
'__a.only(__b, __c)': '__a(__b, __c)',
|
|
7
5
|
'__a.only(__b, __c, __d)': '__a(__b, __c, __d)',
|
|
8
6
|
});
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
export const filter = (path) => {
|
|
11
9
|
const objectPath = path.get('callee.object');
|
|
12
10
|
|
|
13
11
|
if (!objectPath.isIdentifier())
|
package/lib/remove-skip/index.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import {types} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {types} = require('putout');
|
|
4
3
|
const {isIdentifier} = types;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => 'Remove "test.skip"';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const replace = () => ({
|
|
9
8
|
'__a.skip(__b, __c)': '__a(__b, __c)',
|
|
10
9
|
'__a.skip(__b, __c, __d)': '__a(__b, __c, __d)',
|
|
11
10
|
});
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
export const filter = (path) => {
|
|
14
13
|
return isIdentifier(path.node.callee.object, {
|
|
15
14
|
name: 'test',
|
|
16
15
|
});
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {operator} = require('putout');
|
|
4
|
-
|
|
5
|
-
const {
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {
|
|
6
3
|
TEST,
|
|
7
4
|
TEST_ONLY,
|
|
8
5
|
TEST_SKIP,
|
|
9
6
|
TEST_ASYNC,
|
|
10
7
|
TEST_ASYNC_ONLY,
|
|
11
8
|
TEST_ASYNC_SKIP,
|
|
12
|
-
}
|
|
9
|
+
} from '../test-signatures.js';
|
|
13
10
|
|
|
14
|
-
const {
|
|
11
|
+
const {remove} = operator;
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
export const report = () => `Remove 'stopAll()' when you not calling 'reImport()'`;
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
export const fix = (path) => {
|
|
19
16
|
remove(path);
|
|
20
17
|
};
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
export const traverse = ({push}) => ({
|
|
23
20
|
[TEST]: createTraverse(push),
|
|
24
21
|
[TEST_ONLY]: createTraverse(push),
|
|
25
22
|
[TEST_SKIP]: createTraverse(push),
|
|
@@ -52,7 +49,7 @@ function check(path) {
|
|
|
52
49
|
let hasMockImport = false;
|
|
53
50
|
let stopAllPath = null;
|
|
54
51
|
|
|
55
|
-
traverse(path, {
|
|
52
|
+
operator.traverse(path, {
|
|
56
53
|
'reImport(__a)': () => {
|
|
57
54
|
hasReImport = true;
|
|
58
55
|
},
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => 'Remove useless "notCalled" args';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.notCalled(__a, __array)': 't.notCalled(__a)',
|
|
7
5
|
});
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import {operator} from 'putout';
|
|
2
2
|
|
|
3
|
-
const {
|
|
4
|
-
const {traverse, remove} = operator;
|
|
3
|
+
const {remove} = operator;
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
export const report = () => `Avoid useless 't.end()'`;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
export const fix = (path) => {
|
|
9
8
|
remove(path);
|
|
10
9
|
};
|
|
11
10
|
|
|
12
11
|
const TEST = 'test("__a", (t) => __body)';
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
export const traverse = ({push}) => ({
|
|
15
14
|
[TEST]: (path) => {
|
|
16
15
|
const paths = [];
|
|
17
16
|
|
|
18
|
-
traverse(path, {
|
|
17
|
+
operator.traverse(path, {
|
|
19
18
|
't.end()': (path) => {
|
|
20
19
|
paths.push(path);
|
|
21
20
|
},
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => '"result" should be before "expected"';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.replace = () => ({
|
|
3
|
+
export const replace = () => ({
|
|
6
4
|
't.equal(expected, __a)': 't.equal(__a, expected)',
|
|
7
5
|
't.equal(expected, __a, __b)': 't.equal(__a, expected, __b)',
|
|
8
6
|
't.deepEqual(expected, __a)': 't.deepEqual(__a, expected)',
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
'
|
|
1
|
+
export const report = () => `'stub().withName(name)' should synced with variable name`;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports.match = () => ({
|
|
3
|
+
export const match = () => ({
|
|
6
4
|
'const __a = stub().withName(__b)': ({__a, __b}) => __b.value !== __a.name,
|
|
7
5
|
});
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
export const replace = () => ({
|
|
10
8
|
'const __a = stub().withName(__b)': ({__a, __b}, path) => {
|
|
11
9
|
__b.value = __a.name;
|
|
12
10
|
return path;
|
package/lib/test-signatures.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
module.exports.TEST_SKIP = 'test.skip("__a", (t) => __body)';
|
|
8
|
-
module.exports.TEST_ASYNC_SKIP = 'test.skip("__a", async (t) => __body)';
|
|
1
|
+
export const TEST = 'test("__a", (t) => __body)';
|
|
2
|
+
export const TEST_ASYNC = 'test("__a", async (t) => __body)';
|
|
3
|
+
export const TEST_ONLY = 'test.only("__a", (t) => __body)';
|
|
4
|
+
export const TEST_ASYNC_ONLY = 'test.only("__a", async (t) => __body)';
|
|
5
|
+
export const TEST_SKIP = 'test.skip("__a", (t) => __body)';
|
|
6
|
+
export const TEST_ASYNC_SKIP = 'test.skip("__a", async (t) => __body)';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-tape",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
|
+
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin helps with tests",
|
|
7
7
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-tape#readme",
|
|
@@ -30,23 +30,22 @@
|
|
|
30
30
|
"plugin"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@putout/eslint-flat": "^2.0.0",
|
|
34
33
|
"@putout/plugin-putout": "*",
|
|
35
|
-
"@putout/test": "^
|
|
34
|
+
"@putout/test": "^13.0.0",
|
|
36
35
|
"c8": "^10.0.0",
|
|
37
36
|
"eslint": "^9.0.0",
|
|
38
37
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
40
|
-
"madrun": "^
|
|
38
|
+
"eslint-plugin-putout": "^26.0.0",
|
|
39
|
+
"madrun": "^11.0.0",
|
|
41
40
|
"montag": "^1.2.1",
|
|
42
41
|
"nodemon": "^3.0.1"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
|
-
"putout": ">=
|
|
44
|
+
"putout": ">=39"
|
|
46
45
|
},
|
|
47
46
|
"license": "MIT",
|
|
48
47
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
48
|
+
"node": ">=20"
|
|
50
49
|
},
|
|
51
50
|
"publishConfig": {
|
|
52
51
|
"access": "public"
|