@putout/test 6.3.0 → 6.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.
- package/lib/test.js +24 -11
- package/package.json +1 -1
package/lib/test.js
CHANGED
|
@@ -279,16 +279,6 @@ const transform = currify((dir, options, t, name, transformed = null, addons = {
|
|
|
279
279
|
}],
|
|
280
280
|
});
|
|
281
281
|
|
|
282
|
-
if (isUpdate() && isStr) {
|
|
283
|
-
writeSourceFixture({
|
|
284
|
-
full,
|
|
285
|
-
code,
|
|
286
|
-
isTS,
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
return t.pass('source fixture updated');
|
|
290
|
-
}
|
|
291
|
-
|
|
292
282
|
if (isUpdate() && !isStr) {
|
|
293
283
|
writeFixture({
|
|
294
284
|
full,
|
|
@@ -362,7 +352,30 @@ const noTransform = currify((dir, options, t, name, addons = {}) => {
|
|
|
362
352
|
|
|
363
353
|
rmFixture(`${full}-fix`);
|
|
364
354
|
|
|
365
|
-
|
|
355
|
+
const {plugins} = options;
|
|
356
|
+
const [input, isTS] = readFixture(full);
|
|
357
|
+
|
|
358
|
+
const {code} = putout(input, {
|
|
359
|
+
printer: getPrinter(),
|
|
360
|
+
isTS,
|
|
361
|
+
...options,
|
|
362
|
+
plugins: [{
|
|
363
|
+
...toObject(plugins),
|
|
364
|
+
...addons,
|
|
365
|
+
}],
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
if (isUpdate()) {
|
|
369
|
+
writeSourceFixture({
|
|
370
|
+
full,
|
|
371
|
+
code,
|
|
372
|
+
isTS,
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
return t.pass('source fixture updated');
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
return t.equal(code, fixture);
|
|
366
379
|
});
|
|
367
380
|
|
|
368
381
|
const transformCode = currify((options, t, input, output, isTS = false) => {
|