@putout/test 7.0.0 → 7.1.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.
package/README.md CHANGED
@@ -40,7 +40,7 @@ To write test for your plugins you need initialize `test` using `createTest`:
40
40
 
41
41
  ```js
42
42
  import {createTest} from '@putout/test';
43
- import rmVars from '@putout/plugin-remove-unused-variables';
43
+ import * as rmVars from '@putout/plugin-remove-unused-variables';
44
44
 
45
45
  const test = createTest(import.meta.url, {
46
46
  'remove-unused-variables': rmVars,
@@ -226,7 +226,7 @@ First you need to create test with:
226
226
 
227
227
  ```js
228
228
  import {createTest} from '@putout/test';
229
- import rmVars from '@putout/plugin-remove-unused-variables';
229
+ import * as rmVars from '@putout/plugin-remove-unused-variables';
230
230
 
231
231
  const test = createTest(import.meta.url, {
232
232
  'remove-unused-variables': rmVars,
@@ -127,6 +127,7 @@ export const createTest = (url, plugins = {}) => {
127
127
  const [, places] = await eslint({
128
128
  name: resolvedName,
129
129
  code,
130
+ putout: true,
130
131
  config: {
131
132
  ...config,
132
133
  ...override,
@@ -1,6 +1,6 @@
1
1
  import {dirname} from 'path';
2
2
  import {fileURLToPath} from 'url';
3
- import processor from './index.js';
3
+ import * as processor from './index.js';
4
4
 
5
5
  export const createTest = (url, plugins) => {
6
6
  const __filename = fileURLToPath(url);
package/lib/test.js CHANGED
@@ -111,8 +111,8 @@ function createTest(dir, maybeOptions) {
111
111
  noReportAfterTransform: noReportAfterTransform(dir, options),
112
112
  reportWithOptions: reportWithOptions(dir, options),
113
113
  noReportWithOptions: noReportWithOptions(dir, options),
114
- reportCode: reportCode(options), //formatSave: formatSave(dir, options),
115
- format: formatSave(dir, options), //formatManySave: formatManySave(dir, options),
114
+ reportCode: reportCode(options),
115
+ format: formatSave(dir, options),
116
116
  formatMany: formatManySave(dir, options),
117
117
  noFormat: noFormat(dir, options),
118
118
  });
@@ -215,11 +215,11 @@ const formatMany = currify((dir, options, t) => async (formatter, names, formatt
215
215
  };
216
216
  });
217
217
 
218
- const formatManySave = currify((dir, options, t) => async (formatter, names, options = {}) => {
218
+ const formatManySave = currify((dir, options, t) => async (formatter, names, formatterOptions = {}) => {
219
219
  const runFormat = await formatMany(dir, options, t);
220
220
 
221
221
  if (!isUpdate())
222
- return await runFormat(formatter, names, options);
222
+ return await runFormat(formatter, names, formatterOptions);
223
223
 
224
224
  const {existsSync, writeFileSync} = global.__putout_test_fs;
225
225
 
@@ -239,11 +239,11 @@ const formatManySave = currify((dir, options, t) => async (formatter, names, opt
239
239
  return t.pass('fixed fixture updated');
240
240
  });
241
241
 
242
- const formatSave = currify((dir, options, t) => async (formatter, name, options = {}) => {
242
+ const formatSave = currify((dir, options, t) => async (formatter, name, formatterOptions = {}) => {
243
243
  const runFormat = format(dir, options, t);
244
244
 
245
245
  if (!isUpdate())
246
- return await runFormat(formatter, name, options);
246
+ return await runFormat(formatter, name, formatterOptions);
247
247
 
248
248
  const {existsSync, writeFileSync} = global.__putout_test_fs;
249
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "7.0.0",
3
+ "version": "7.1.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 ",
@@ -65,11 +65,11 @@
65
65
  "c8": "^8.0.0",
66
66
  "eslint": "^8.0.1",
67
67
  "eslint-plugin-n": "^16.0.0",
68
- "eslint-plugin-putout": "^18.0.0",
68
+ "eslint-plugin-putout": "^19.0.0",
69
69
  "lerna": "^6.0.1",
70
70
  "madrun": "^9.0.0",
71
71
  "mock-require": "^3.0.3",
72
- "nodemon": "^2.0.1"
72
+ "nodemon": "^3.0.1"
73
73
  },
74
74
  "license": "MIT",
75
75
  "engines": {