@putout/test 15.5.1 → 15.6.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.
- package/lib/fixture.js +1 -1
- package/lib/test.js +9 -5
- package/package.json +1 -1
package/lib/fixture.js
CHANGED
|
@@ -69,7 +69,7 @@ export const rmFixture = (name, extension) => {
|
|
|
69
69
|
if (!isUpdate())
|
|
70
70
|
return;
|
|
71
71
|
|
|
72
|
+
tryCatch(unlinkSync, `${name}.${extension}`);
|
|
72
73
|
tryCatch(unlinkSync, `${name}.js`);
|
|
73
74
|
tryCatch(unlinkSync, `${name}.ts`);
|
|
74
|
-
tryCatch(unlinkSync, `${name}.${extension}`);
|
|
75
75
|
};
|
package/lib/test.js
CHANGED
|
@@ -273,14 +273,18 @@ const noTransformWithOptions = currify((dir, linterOptions, options, t, name, ru
|
|
|
273
273
|
});
|
|
274
274
|
|
|
275
275
|
const noTransform = currify((dir, linterOptions, options, t, name, addons = {}) => {
|
|
276
|
-
const {
|
|
276
|
+
const {
|
|
277
|
+
lint,
|
|
278
|
+
extension,
|
|
279
|
+
extensionFix,
|
|
280
|
+
} = linterOptions;
|
|
281
|
+
|
|
277
282
|
const full = join(dir, name);
|
|
278
|
-
const [
|
|
283
|
+
const [input, isTS, currentExtension] = readFixture(full, extension, extensionFix);
|
|
279
284
|
|
|
280
|
-
rmFixture(`${full}-fix
|
|
285
|
+
rmFixture(`${full}-fix`, currentExtension);
|
|
281
286
|
|
|
282
287
|
const {plugins} = options;
|
|
283
|
-
const [input, isTS, currentExtension] = readFixture(full, extension);
|
|
284
288
|
|
|
285
289
|
const {code} = lint(input, {
|
|
286
290
|
isTS,
|
|
@@ -301,7 +305,7 @@ const noTransform = currify((dir, linterOptions, options, t, name, addons = {})
|
|
|
301
305
|
return t.pass('source fixture updated');
|
|
302
306
|
}
|
|
303
307
|
|
|
304
|
-
return t.equal(code,
|
|
308
|
+
return t.equal(code, input);
|
|
305
309
|
});
|
|
306
310
|
|
|
307
311
|
const transformCode = currify((linterOptions, options, t, input, output, isTS = false) => {
|