@putout/test 5.8.0 → 5.10.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/lib/processor/index.js +2 -1
- package/lib/test.js +5 -1
- package/package.json +2 -2
package/lib/processor/index.js
CHANGED
|
@@ -93,7 +93,7 @@ const createComparePlaces = (dir, options) => (operator) => async (filename, exp
|
|
|
93
93
|
};
|
|
94
94
|
module.exports._createComparePlaces = createComparePlaces;
|
|
95
95
|
|
|
96
|
-
async function process(filename, dir, {processors, plugins, extension, fix = true, noChange = false}) {
|
|
96
|
+
async function process(filename, dir, {processors, plugins, extension, fix = true, noChange = false, processorRunners}) {
|
|
97
97
|
extension = addDot(extname(filename).slice(1) || extension);
|
|
98
98
|
filename = basename(filename, String(extension));
|
|
99
99
|
|
|
@@ -117,6 +117,7 @@ async function process(filename, dir, {processors, plugins, extension, fix = tru
|
|
|
117
117
|
processFile: processFile({fix}),
|
|
118
118
|
options,
|
|
119
119
|
rawSource,
|
|
120
|
+
processorRunners,
|
|
120
121
|
});
|
|
121
122
|
|
|
122
123
|
if (isUpdate() && !noChange)
|
package/lib/test.js
CHANGED
|
@@ -260,6 +260,8 @@ const transform = currify(({dir, plugins, rules}, t, name, transformed = null, a
|
|
|
260
260
|
code,
|
|
261
261
|
isTS,
|
|
262
262
|
});
|
|
263
|
+
|
|
264
|
+
return t.pass('fixture updated');
|
|
263
265
|
}
|
|
264
266
|
|
|
265
267
|
return t.equal(code, output);
|
|
@@ -280,8 +282,10 @@ const transformWithOptions = currify(({dir, plugins}, t, name, options) => {
|
|
|
280
282
|
|
|
281
283
|
const {code} = putout(input, {isTS, plugins, rules});
|
|
282
284
|
|
|
283
|
-
if (isUpdate())
|
|
285
|
+
if (isUpdate()) {
|
|
284
286
|
writeFileSync(`${full}-fix.js`, code);
|
|
287
|
+
return t.pass('fixture updated');
|
|
288
|
+
}
|
|
285
289
|
|
|
286
290
|
return t.equal(code, output);
|
|
287
291
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/test",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.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 ",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@putout/eslint": "^1.2.0",
|
|
45
45
|
"currify": "^4.0.0",
|
|
46
46
|
"putout": "*",
|
|
47
|
-
"supertape": "^
|
|
47
|
+
"supertape": "^8.0.0",
|
|
48
48
|
"try-catch": "^3.0.0",
|
|
49
49
|
"try-to-catch": "^3.0.0"
|
|
50
50
|
},
|