File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ jest.autoMockOff()
3
3
import * as fs from 'fs'
4
4
import * as path from 'path'
5
5
import runTransformation from './runTransformation'
6
+ import transformationMap from '../transformations'
7
+ import vueTransformationMap from '../vue-transformations'
6
8
7
9
export const runTest = (
8
10
description : string ,
@@ -34,9 +36,9 @@ export const runTest = (
34
36
path : inputPath ,
35
37
source : fs . readFileSync ( inputPath ) . toString ( )
36
38
}
37
- const transformation = require ( ( transformationType == 'vue'
38
- ? '../vue-transformations'
39
- : '../wrapAstTransformation' ) + `/ ${ transformationName } ` )
39
+ const transformation = ( transformationType == 'vue'
40
+ ? vueTransformationMap
41
+ : transformationMap ) [ transformationName ]
40
42
expect ( runTransformation ( fileInfo , transformation ) ) . toEqual (
41
43
fs . readFileSync ( outputPath ) . toString ( )
42
44
)
You can’t perform that action at this time.
0 commit comments