@putout/plugin-tape 16.1.0 → 17.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.
|
@@ -21,7 +21,7 @@ const {
|
|
|
21
21
|
insertBefore,
|
|
22
22
|
} = operator;
|
|
23
23
|
|
|
24
|
-
const {
|
|
24
|
+
const {expressionStatement} = types;
|
|
25
25
|
|
|
26
26
|
module.exports.report = () => `Call 'stopAll()' at the end of test when 'mockImport()' used`;
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ module.exports.fix = (path) => {
|
|
|
29
29
|
const assertionPath = getAssertionsPath(path);
|
|
30
30
|
const stopAllNode = template.ast('stopAll()');
|
|
31
31
|
|
|
32
|
-
insertBefore(assertionPath,
|
|
32
|
+
insertBefore(assertionPath, expressionStatement(stopAllNode));
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
module.exports.traverse = ({push}) => ({
|
package/lib/add-t-end/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const {
|
|
|
7
7
|
} = require('putout');
|
|
8
8
|
|
|
9
9
|
const {compare, traverse} = operator;
|
|
10
|
-
const {
|
|
10
|
+
const {expressionStatement} = types;
|
|
11
11
|
|
|
12
12
|
module.exports.report = () => `'t.end()' is missing at the end of the test`;
|
|
13
13
|
|
|
@@ -50,6 +50,6 @@ function match({__body}, path) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
function replace({__body}, path) {
|
|
53
|
-
__body.body.push(
|
|
53
|
+
__body.body.push(expressionStatement(template.ast('t.end()')));
|
|
54
54
|
return path;
|
|
55
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
module.exports.report = () => '
|
|
3
|
+
module.exports.report = () => `Use 'calledWithNoArgs()' when arguments are absent`;
|
|
4
4
|
|
|
5
5
|
module.exports.replace = () => ({
|
|
6
6
|
't.calledWith(__a)': 't.calledWithNoArgs(__a)',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-tape",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin helps with tests",
|
|
@@ -27,23 +27,22 @@
|
|
|
27
27
|
"keywords": [
|
|
28
28
|
"putout",
|
|
29
29
|
"putout-plugin",
|
|
30
|
-
"plugin"
|
|
31
|
-
"putout"
|
|
30
|
+
"plugin"
|
|
32
31
|
],
|
|
33
32
|
"devDependencies": {
|
|
33
|
+
"@putout/eslint-flat": "^2.0.0",
|
|
34
34
|
"@putout/plugin-putout": "*",
|
|
35
|
-
"@putout/test": "^
|
|
35
|
+
"@putout/test": "^12.0.0",
|
|
36
36
|
"c8": "^10.0.0",
|
|
37
37
|
"eslint": "^9.0.0",
|
|
38
38
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
40
|
-
"lerna": "^6.0.1",
|
|
39
|
+
"eslint-plugin-putout": "^25.0.1",
|
|
41
40
|
"madrun": "^10.0.0",
|
|
42
41
|
"montag": "^1.2.1",
|
|
43
42
|
"nodemon": "^3.0.1"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
|
-
"putout": ">=
|
|
45
|
+
"putout": ">=38"
|
|
47
46
|
},
|
|
48
47
|
"license": "MIT",
|
|
49
48
|
"engines": {
|