@putout/test 13.2.3 → 13.3.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.
Files changed (3) hide show
  1. package/README.md +13 -2
  2. package/lib/test.js +7 -2
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -201,7 +201,7 @@ test('putout: plugin: declare-undefined-variables: transform: assign: dismiss',
201
201
  });
202
202
  ```
203
203
 
204
- ### `noReport(filename)`
204
+ ### `noReport(filename [, plugins])`
205
205
 
206
206
  Check error message of a plugin not produces
207
207
 
@@ -212,6 +212,17 @@ test('plugin-putout: check-replace-code: no report: typescript', (t) => {
212
212
  });
213
213
  ```
214
214
 
215
+ with plugins:
216
+
217
+ ```js
218
+ test('plugin-putout: check-replace-code: no report: hello', (t) => {
219
+ t.noReport('typescript', [
220
+ ['plugin', plugin],
221
+ ]);
222
+ t.end();
223
+ });
224
+ ```
225
+
215
226
  ### `noReportCode(filename)`
216
227
 
217
228
  Check error message of a plugin not produces
@@ -228,7 +239,7 @@ test('plugin-putout: check-replace-code: no report: import', (t) => {
228
239
  Check error message of a plugin not produced
229
240
 
230
241
  ```js
231
- test('test: no report after transform', (t) => {
242
+ test('test: no report after transform: file', (t) => {
232
243
  t.noReportAfterTransform('file');
233
244
  t.end();
234
245
  });
package/lib/test.js CHANGED
@@ -471,7 +471,8 @@ const report = (dir, linterOptions, options) => (t) => (name, message, plugins)
471
471
  return run(source, message, plugins);
472
472
  };
473
473
 
474
- const noReport = currify((dir, linterOptions, options, t, name) => {
474
+ const noReport = (dir, linterOptions, options) => (t) => (name, addons = []) => {
475
+ const {plugins} = options;
475
476
  const {lint, extension} = linterOptions;
476
477
  const full = join(dir, name);
477
478
  const [source, isTS] = readFixture(full, extension);
@@ -481,8 +482,12 @@ const noReport = currify((dir, linterOptions, options, t, name) => {
481
482
  return noReportCode(lint, {
482
483
  isTS,
483
484
  ...options,
485
+ plugins: [{
486
+ ...toObject(plugins),
487
+ ...toObject(addons),
488
+ }],
484
489
  }, t, source);
485
- });
490
+ };
486
491
 
487
492
  module.exports._createNoReport = noReport;
488
493
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "13.2.3",
3
+ "version": "13.3.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Test runner for 🐊Putout plugins ",
@@ -38,7 +38,7 @@
38
38
  "report": "madrun report"
39
39
  },
40
40
  "dependencies": {
41
- "@putout/cli-process-file": "^3.0.0",
41
+ "@putout/cli-process-file": "^4.0.0",
42
42
  "@putout/engine-processor": "*",
43
43
  "@putout/engine-runner": "*",
44
44
  "@putout/eslint": "^4.0.0",
@@ -70,7 +70,7 @@
70
70
  "c8": "^10.0.0",
71
71
  "eslint": "^9.0.0",
72
72
  "eslint-plugin-n": "^17.0.0",
73
- "eslint-plugin-putout": "^26.0.0",
73
+ "eslint-plugin-putout": "^27.0.0",
74
74
  "madrun": "^11.0.0",
75
75
  "mock-require": "^3.0.3",
76
76
  "nodemon": "^3.0.1",