@putout/plugin-tape 21.19.1 → 21.20.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.
@@ -1,6 +1,7 @@
1
1
  import {template, types} from 'putout';
2
2
 
3
3
  const {
4
+ isAwaitExpression,
4
5
  isUnaryExpression,
5
6
  isThrowStatement,
6
7
  isBlockStatement,
@@ -16,6 +17,9 @@ export const match = () => ({
16
17
  if (isCallExpression(__a))
17
18
  return false;
18
19
 
20
+ if (isAwaitExpression(__a))
21
+ return false;
22
+
19
23
  if (!isBlockStatement(__a))
20
24
  return true;
21
25
 
@@ -1,5 +1,13 @@
1
+ import {types} from 'putout';
2
+
3
+ const {isVariableDeclarator} = types;
4
+
1
5
  export const report = () => `Use 't.pass()' instead of 't.ok()'`;
2
6
 
7
+ export const match = () => ({
8
+ 't.ok(true)': (vars, path) => !path.find(isVariableDeclarator),
9
+ });
10
+
3
11
  export const replace = () => ({
4
12
  't.ok(true)': 't.pass()',
5
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-tape",
3
- "version": "21.19.1",
3
+ "version": "21.20.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with tests",