@putout/plugin-tape 20.3.0 → 21.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.
@@ -19,7 +19,7 @@ export const replace = () => ({
19
19
  't.notEqual(__a, __b)': 't.notDeepEqual(__a, __b)',
20
20
  });
21
21
 
22
- function check({__b}, path) {
22
+ function check({__a, __b}, path) {
23
23
  if (isObjectExpression(__b))
24
24
  return true;
25
25
 
@@ -29,6 +29,15 @@ function check({__b}, path) {
29
29
  if (!isIdentifier(__b))
30
30
  return false;
31
31
 
32
+ const __aDeclaration = path.scope.bindings[__a.name];
33
+
34
+ if (__aDeclaration) {
35
+ const {init} = __aDeclaration.path.node;
36
+
37
+ if (compare(init, 'new Date(__args)'))
38
+ return true;
39
+ }
40
+
32
41
  const __bDeclaration = path.scope.bindings[__b.name];
33
42
 
34
43
  if (!__bDeclaration)
@@ -36,6 +45,9 @@ function check({__b}, path) {
36
45
 
37
46
  const {id, init} = __bDeclaration.path.node;
38
47
 
48
+ if (compare(init, 'new Date(__args)'))
49
+ return true;
50
+
39
51
  if (!isIdentifier(id, {name: 'expected'}))
40
52
  return false;
41
53
 
@@ -3,5 +3,4 @@ export const declare = () => ({
3
3
  stub: 'import {stub} from "supertape"',
4
4
  Test: 'import {Test} from "supertape"',
5
5
  Stub: 'import {Stub} from "supertape"',
6
- defineEnv: 'import {defineEnv} from "supertape/env"',
7
6
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-tape",
3
- "version": "20.3.0",
3
+ "version": "21.0.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",
@@ -33,15 +33,15 @@
33
33
  "@putout/plugin-putout": "*",
34
34
  "@putout/test": "^15.0.0",
35
35
  "c8": "^10.0.0",
36
- "eslint": "^10.0.0-alpha.0",
36
+ "eslint": "^10.0.0",
37
37
  "eslint-plugin-n": "^17.0.0",
38
- "eslint-plugin-putout": "^30.0.0",
39
- "madrun": "^12.0.0",
38
+ "eslint-plugin-putout": "^31.0.0",
39
+ "madrun": "^13.0.0",
40
40
  "montag": "^1.2.1",
41
41
  "nodemon": "^3.0.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "putout": ">=41"
44
+ "putout": ">=42"
45
45
  },
46
46
  "license": "MIT",
47
47
  "engines": {