File tree 2 files changed +29
-0
lines changed
fixtures/build-withTsconfig/src
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // ensure that extends works (trailing comma & comment too)
3
+ "extends" : " ../tsconfig.base.json" ,
4
+ "compilerOptions" : {
5
+ "declarationDir" : " ../typingsCustom/"
6
+ }
7
+ }
Original file line number Diff line number Diff line change @@ -136,6 +136,28 @@ describe('tsdx build', () => {
136
136
expect ( output . code ) . toBe ( 0 ) ;
137
137
} ) ;
138
138
139
+ it ( 'should read custom --tsconfig path' , ( ) => {
140
+ util . setupStageWithFixture ( stageName , 'build-withTsconfig' ) ;
141
+
142
+ const output = shell . exec (
143
+ 'node ../dist/index.js build --format cjs --tsconfig ./src/tsconfig.json'
144
+ ) ;
145
+
146
+ expect ( shell . test ( '-f' , 'dist/index.js' ) ) . toBeTruthy ( ) ;
147
+ expect (
148
+ shell . test ( '-f' , 'dist/build-withtsconfig.cjs.development.js' )
149
+ ) . toBeTruthy ( ) ;
150
+ expect (
151
+ shell . test ( '-f' , 'dist/build-withtsconfig.cjs.production.min.js' )
152
+ ) . toBeTruthy ( ) ;
153
+
154
+ expect ( shell . test ( '-f' , 'dist/index.d.ts' ) ) . toBeFalsy ( ) ;
155
+ expect ( shell . test ( '-f' , 'typingsCustom/index.d.ts' ) ) . toBeTruthy ( ) ;
156
+ expect ( shell . test ( '-f' , 'typingsCustom/index.d.ts.map' ) ) . toBeTruthy ( ) ;
157
+
158
+ expect ( output . code ) . toBe ( 0 ) ;
159
+ } ) ;
160
+
139
161
afterEach ( ( ) => {
140
162
util . teardownStage ( stageName ) ;
141
163
} ) ;
You can’t perform that action at this time.
0 commit comments