@putout/test 7.2.0 → 7.3.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/test.js +4 -10
  2. package/package.json +1 -1
package/lib/test.js CHANGED
@@ -222,7 +222,7 @@ const formatManySave = currify((dir, options, t) => async (formatter, names, for
222
222
  if (!isUpdate())
223
223
  return await runFormat(formatter, names, formatterOptions);
224
224
 
225
- const {existsSync, writeFileSync} = global.__putout_test_fs;
225
+ const {writeFileSync} = global.__putout_test_fs;
226
226
 
227
227
  if (!isArray(names))
228
228
  throw Error(`☝️ Looks like 'formatMany()' received 'names' with type: '${typeof names}', expected: 'array'`);
@@ -230,10 +230,7 @@ const formatManySave = currify((dir, options, t) => async (formatter, names, for
230
230
  const name = `${names.join('-')}-format.js`;
231
231
  const outputName = join(dir, name);
232
232
 
233
- if (!existsSync(outputName))
234
- writeFileSync(outputName, '');
235
-
236
- const {result} = await runFormat(formatter, names, options);
233
+ const {result} = await runFormat(formatter, names, formatterOptions);
237
234
 
238
235
  writeFileSync(outputName, result);
239
236
 
@@ -246,15 +243,12 @@ const formatSave = currify((dir, options, t) => async (formatter, name, formatte
246
243
  if (!isUpdate())
247
244
  return await runFormat(formatter, name, formatterOptions);
248
245
 
249
- const {existsSync, writeFileSync} = global.__putout_test_fs;
246
+ const {writeFileSync} = global.__putout_test_fs;
250
247
 
251
248
  const full = join(dir, name);
252
249
  const outputName = `${full}-format.js`;
253
250
 
254
- if (!existsSync(outputName))
255
- writeFileSync(outputName, '');
256
-
257
- const {result} = await runFormat(formatter, name, options);
251
+ const {result} = await runFormat(formatter, name, formatterOptions);
258
252
 
259
253
  writeFileSync(outputName, result);
260
254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Test runner for 🐊Putout plugins ",