@putout/test 15.5.1 → 15.6.1

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/lib/fixture.js CHANGED
@@ -69,7 +69,7 @@ export const rmFixture = (name, extension) => {
69
69
  if (!isUpdate())
70
70
  return;
71
71
 
72
+ tryCatch(unlinkSync, `${name}.${extension}`);
72
73
  tryCatch(unlinkSync, `${name}.js`);
73
74
  tryCatch(unlinkSync, `${name}.ts`);
74
- tryCatch(unlinkSync, `${name}.${extension}`);
75
75
  };
package/lib/test.js CHANGED
@@ -273,14 +273,18 @@ const noTransformWithOptions = currify((dir, linterOptions, options, t, name, ru
273
273
  });
274
274
 
275
275
  const noTransform = currify((dir, linterOptions, options, t, name, addons = {}) => {
276
- const {lint, extension} = linterOptions;
276
+ const {
277
+ lint,
278
+ extension,
279
+ extensionFix,
280
+ } = linterOptions;
281
+
277
282
  const full = join(dir, name);
278
- const [fixture] = readFixture(full, extension);
283
+ const [input, isTS, currentExtension] = readFixture(full, extension, extensionFix);
279
284
 
280
- rmFixture(`${full}-fix`);
285
+ rmFixture(`${full}-fix`, currentExtension);
281
286
 
282
287
  const {plugins} = options;
283
- const [input, isTS, currentExtension] = readFixture(full, extension);
284
288
 
285
289
  const {code} = lint(input, {
286
290
  isTS,
@@ -301,7 +305,7 @@ const noTransform = currify((dir, linterOptions, options, t, name, addons = {})
301
305
  return t.pass('source fixture updated');
302
306
  }
303
307
 
304
- return t.equal(code, fixture);
308
+ return t.equal(code, input);
305
309
  });
306
310
 
307
311
  const transformCode = currify((linterOptions, options, t, input, output, isTS = false) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "15.5.1",
3
+ "version": "15.6.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Test runner for 🐊Putout plugins ",