@putout/plugin-tape 15.1.0 → 16.1.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/README.md +8 -0
- package/lib/remove-only/index.js +6 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -817,6 +817,10 @@ t.notCalled(fn);
|
|
|
817
817
|
test.only('some test', (t) => {
|
|
818
818
|
t.end();
|
|
819
819
|
});
|
|
820
|
+
|
|
821
|
+
testDeclareBeforeReference.only('some test', (t) => {
|
|
822
|
+
t.end();
|
|
823
|
+
});
|
|
820
824
|
```
|
|
821
825
|
|
|
822
826
|
### ✅ Example of correct code
|
|
@@ -825,6 +829,10 @@ test.only('some test', (t) => {
|
|
|
825
829
|
test('some test', (t) => {
|
|
826
830
|
t.end();
|
|
827
831
|
});
|
|
832
|
+
|
|
833
|
+
testDeclareBeforeReference('some test', (t) => {
|
|
834
|
+
t.end();
|
|
835
|
+
});
|
|
828
836
|
```
|
|
829
837
|
|
|
830
838
|
## remove-skip
|
package/lib/remove-only/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {types} = require('putout');
|
|
4
|
-
const {isIdentifier} = types;
|
|
5
|
-
|
|
6
3
|
module.exports.report = () => `Remove 'test.only'`;
|
|
7
4
|
|
|
8
5
|
module.exports.replace = () => ({
|
|
@@ -11,7 +8,10 @@ module.exports.replace = () => ({
|
|
|
11
8
|
});
|
|
12
9
|
|
|
13
10
|
module.exports.filter = (path) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const objectPath = path.get('callee.object');
|
|
12
|
+
|
|
13
|
+
if (!objectPath.isIdentifier())
|
|
14
|
+
return false;
|
|
15
|
+
|
|
16
|
+
return objectPath.node.name.startsWith('test');
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-tape",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.1.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",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"changelog": false,
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "git://github.com/coderaiser/putout.git"
|
|
14
|
+
"url": "git+https://github.com/coderaiser/putout.git"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "madrun test",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"c8": "^10.0.0",
|
|
37
37
|
"eslint": "^9.0.0",
|
|
38
38
|
"eslint-plugin-n": "^17.0.0",
|
|
39
|
-
"eslint-plugin-putout": "^
|
|
39
|
+
"eslint-plugin-putout": "^23.0.0",
|
|
40
40
|
"lerna": "^6.0.1",
|
|
41
41
|
"madrun": "^10.0.0",
|
|
42
42
|
"montag": "^1.2.1",
|
|
43
43
|
"nodemon": "^3.0.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"putout": ">=
|
|
46
|
+
"putout": ">=37"
|
|
47
47
|
},
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"engines": {
|