File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "include" : [" src/main.ts" ]
3
+ }
Original file line number Diff line number Diff line change @@ -73,4 +73,26 @@ export src/a.ts:2:0 'a2'
73
73
) ;
74
74
assert . equal ( code , 1 ) ;
75
75
} ) ;
76
+
77
+ it ( 'should work with custom tsconfig.json' , async ( ) => {
78
+ const { stdout, code } = await exec (
79
+ `node ${ bin } --project tsconfig.main.json 'src/main\\.ts$'` ,
80
+ {
81
+ cwd : projectRoot ,
82
+ } ,
83
+ )
84
+ . then ( ( res ) => ( { ...res , code : 0 } ) )
85
+ . catch ( ( e ) => e as { stdout : string ; code : number } ) ;
86
+
87
+ const output = stripAnsi ( stdout . toString ( ) ) ;
88
+
89
+ assert . equal (
90
+ output ,
91
+ `tsconfig tsconfig.main.json
92
+ Project has 1 file. Found 1 entrypoint file
93
+ ✔ all good!
94
+ ` ,
95
+ ) ;
96
+ assert . equal ( code , 0 ) ;
97
+ } ) ;
76
98
} ) ;
You can’t perform that action at this time.
0 commit comments