@putout/test 11.0.0 → 11.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
@@ -53,7 +53,7 @@ const test = createTest(import.meta.url, {
53
53
  Check error message (or messages) of a plugin:
54
54
 
55
55
  ```js
56
- test('remove usless variables: for-of', (t) => {
56
+ test('remove useless variables: for-of', (t) => {
57
57
  t.report('dot', 'Dot files should be added to .gitignore');
58
58
  t.end();
59
59
  });
@@ -62,7 +62,7 @@ test('remove usless variables: for-of', (t) => {
62
62
  When you want to check that report called exact count of times pass an array of messages:
63
63
 
64
64
  ```js
65
- test('remove usless variables: for-of', (t) => {
65
+ test('remove useless variables: for-of', (t) => {
66
66
  t.report('dot', ['Dot files should be added to .gitignore']);
67
67
  t.end();
68
68
  });
@@ -84,7 +84,7 @@ test('remove debugger: report', (t) => {
84
84
  Check transform of `filename.js` -> `filename-fix.js` in `test/fixtures` directory:
85
85
 
86
86
  ```js
87
- test('remove usless variables: for-of', (t) => {
87
+ test('remove useless variables: for-of', (t) => {
88
88
  t.transform('array-from', {
89
89
  'remove-useless-array-from': removeUselessArrayFrom,
90
90
  });
@@ -228,7 +228,7 @@ test('plugin-apply-numeric-separators: no transform: hex', (t) => {
228
228
  Check progress of `filename.js`;
229
229
 
230
230
  ```js
231
- test('remove usless variables: for-of', async ({progress}) => {
231
+ test('remove useless variables: for-of', async ({progress}) => {
232
232
  await progress('progress', {
233
233
  i: 0,
234
234
  n: 2,
@@ -242,7 +242,7 @@ test('remove usless variables: for-of', async ({progress}) => {
242
242
  Check progress of `filename.js`;
243
243
 
244
244
  ```js
245
- test('remove usless variables: for-of', async ({progressWithOptions}) => {
245
+ test('remove useless variables: for-of', async ({progressWithOptions}) => {
246
246
  const options = {
247
247
  from: '/home/coderaiser',
248
248
  to: '/',
package/lib/test.js CHANGED
@@ -498,14 +498,14 @@ const noReport = currify((dir, options, t, name) => {
498
498
 
499
499
  module.exports._createNoReport = noReport;
500
500
 
501
- const noReportAfterTransform = currify((dir, options, t, name) => {
501
+ const noReportAfterTransform = currify((dir, options, t, name, addons = {}) => {
502
502
  const full = join(dir, name);
503
503
  const [source, isTS] = readFixture(full);
504
504
 
505
505
  return noReportCodeAfterTransform({
506
506
  isTS,
507
507
  ...options,
508
- }, t, source);
508
+ }, t, source, addons);
509
509
  });
510
510
 
511
511
  module.exports._createNoReportAfterTransform = noReportAfterTransform;
@@ -589,10 +589,15 @@ const noReportCode = currify((options, t, source) => {
589
589
  return t.deepEqual(places, [], 'should not report');
590
590
  });
591
591
 
592
- const noReportCodeAfterTransform = currify((options, t, source) => {
592
+ const noReportCodeAfterTransform = currify((options, t, source, addons = {}) => {
593
+ const {plugins} = options;
593
594
  const {places} = putout(source, {
594
595
  fix: true,
595
596
  ...options,
597
+ plugins: [{
598
+ ...toObject(plugins),
599
+ ...addons,
600
+ }],
596
601
  });
597
602
 
598
603
  return t.deepEqual(places, [], 'should not report after transform');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "11.0.0",
3
+ "version": "11.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 ",
@@ -18,7 +18,6 @@
18
18
  "require": "./lib/processor/index.js",
19
19
  "import": "./lib/processor/index.mjs"
20
20
  },
21
- "./formatter": "./lib/formatter/index.mjs",
22
21
  "./eslint": "./lib/eslint/eslint.mjs"
23
22
  },
24
23
  "release": false,
@@ -26,7 +25,7 @@
26
25
  "changelog": false,
27
26
  "repository": {
28
27
  "type": "git",
29
- "url": "git://github.com/coderaiser/putout.git"
28
+ "url": "git+https://github.com/coderaiser/putout.git"
30
29
  },
31
30
  "scripts": {
32
31
  "test": "madrun test",
@@ -68,7 +67,7 @@
68
67
  "c8": "^10.0.0",
69
68
  "eslint": "^9.0.0",
70
69
  "eslint-plugin-n": "^17.0.0",
71
- "eslint-plugin-putout": "^22.0.0",
70
+ "eslint-plugin-putout": "^23.0.0",
72
71
  "lerna": "^6.0.1",
73
72
  "madrun": "^10.0.0",
74
73
  "mock-require": "^3.0.3",