File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 11import { globbySync } from 'globby'
22import type { Transform } from 'jscodeshift'
33import type { TestOptions } from 'jscodeshift/src/testUtils'
4- import { runInlineTest } from 'jscodeshift/src/testUtils'
4+ import { applyTransform } from 'jscodeshift/src/testUtils'
55import fs from 'node:fs'
66import path from 'node:path'
77
@@ -41,33 +41,29 @@ export const runTransformTest = (
4141
4242 describe ( `${ testName } ${ extension } ` , ( ) => {
4343 it ( 'transforms correctly' , ( ) => {
44- runInlineTest (
44+ const output = applyTransform (
4545 transform ,
4646 { } ,
4747 {
4848 path : testInputPath ,
4949 source : inputFileContent ,
5050 } ,
51- expectedOutput ,
52- {
53- parser,
54- } ,
51+ { parser } ,
5552 )
53+ expect ( output ) . toBe ( expectedOutput . trim ( ) )
5654 } )
5755
5856 it ( 'is idempotent' , ( ) => {
59- runInlineTest (
57+ const output = applyTransform (
6058 transform ,
6159 { } ,
6260 {
6361 path : testInputPath ,
6462 source : inputFileContent ,
6563 } ,
66- expectedOutput ,
67- {
68- parser,
69- } ,
64+ { parser } ,
7065 )
66+ expect ( output ) . toBe ( expectedOutput . trim ( ) )
7167 } )
7268 } )
7369 } )
You can’t perform that action at this time.
0 commit comments