@@ -11,12 +11,14 @@ describe("v2-to-v3", () => {
11
11
. map ( ( fileName ) => fileName . replace ( ".input.ts" , "" ) ) ;
12
12
13
13
describe . each ( testFilePrefixes ) ( `transforms correctly using "%s" data` , ( testFilePrefix ) => {
14
+ const inputPath = join ( fixtureDir , testFilePrefix + `.input.ts` ) ;
15
+ const outputPath = join ( fixtureDir , testFilePrefix + `.output.ts` ) ;
16
+ const inputCode = readFileSync ( inputPath , "utf8" ) ;
17
+ const outputCode = readFileSync ( outputPath , "utf8" ) ;
18
+ const input = { path : inputPath , source : inputCode } ;
19
+
14
20
it . each ( [ { } , { parser : "ts" } ] ) ( "with testOptions: %o" , ( testOptions ) => {
15
- const path = join ( fixtureDir , testFilePrefix + `.input.ts` ) ;
16
- const source = readFileSync ( path , "utf8" ) ;
17
- const input = { path, source } ;
18
- const expectedOutput = readFileSync ( join ( fixtureDir , testFilePrefix + `.output.ts` ) , "utf8" ) ;
19
- runInlineTest ( transformer , null , input , expectedOutput , testOptions ) ;
21
+ runInlineTest ( transformer , null , input , outputCode , testOptions ) ;
20
22
} ) ;
21
23
} ) ;
22
24
} ) ;
0 commit comments