@putout/test 15.6.1 → 15.7.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.
Files changed (2) hide show
  1. package/lib/fixture.js +12 -11
  2. package/package.json +1 -1
package/lib/fixture.js CHANGED
@@ -11,6 +11,18 @@ const TS = {
11
11
 
12
12
  export const readFixture = (name, extension, extensionFix = env.UPDATE_EXTENSION) => {
13
13
  const {readFileSync} = globalThis.__putout_test_fs;
14
+
15
+ if (extension) {
16
+ const [e, data] = tryCatch(readFileSync, `${name}.${extension}`, 'utf8');
17
+
18
+ if (!e)
19
+ return [
20
+ data,
21
+ TS.DISABLED,
22
+ extensionFix || extension,
23
+ ];
24
+ }
25
+
14
26
  const [eTS, dataTS] = tryCatch(readFileSync, `${name}.ts`, 'utf8');
15
27
 
16
28
  if (!eTS)
@@ -29,17 +41,6 @@ export const readFixture = (name, extension, extensionFix = env.UPDATE_EXTENSION
29
41
  'js',
30
42
  ];
31
43
 
32
- if (extension) {
33
- const [e, data] = tryCatch(readFileSync, `${name}.${extension}`, 'utf8');
34
-
35
- if (!e)
36
- return [
37
- data,
38
- TS.DISABLED,
39
- extensionFix || extension,
40
- ];
41
- }
42
-
43
44
  throw eJS;
44
45
  };
45
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "15.6.1",
3
+ "version": "15.7.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Test runner for 🐊Putout plugins ",