@@ -157,36 +157,22 @@ test('It handles resolveJsonModule option and loads JSON modules', async (t) =>
157157
158158test ( 'It should not allow --script-mode and --dir together' , async ( t ) => {
159159 const ps = spawnTsNodeDev (
160- [
161- `--script-mode` ,
162- `--dir folder` ,
163- `simple.ts` ,
164- ] . join ( ' ' )
165- ) //.turnOnOutput()
160+ [ `--script-mode` , `--dir folder` , `simple.ts` ] . join ( ' ' )
161+ ) //.turnOnOutput()
166162 await ps . waitForLine ( / T y p e E r r o r : S c r i p t m o d e c a n n o t b e c o m b i n e d w i t h ` - - d i r ` / )
167163 t . pass ( 'ok' )
168164 await ps . exit ( )
169165} )
170166
171167test ( 'It should use the tsconfig at --dir when defined' , async ( t ) => {
172- const ps = spawnTsNodeDev (
173- [
174- `--dir dir-test` ,
175- `dir-test/index.ts` ,
176- ] . join ( ' ' )
177- ) //.turnOnOutput()
168+ const ps = spawnTsNodeDev ( [ `--dir dir-test` , `dir-test/index.ts` ] . join ( ' ' ) ) //.turnOnOutput()
178169 await ps . waitForLine ( / \{ h e l l o : ' w o r l d ' \} / )
179170 t . pass ( 'ok' )
180171 await ps . exit ( )
181172} )
182173
183174test ( 'It should use the tsconfig at --script-mode when defined' , async ( t ) => {
184- const ps = spawnTsNodeDev (
185- [
186- `-s` ,
187- `dir-test/index.ts` ,
188- ] . join ( ' ' )
189- ) //.turnOnOutput()
175+ const ps = spawnTsNodeDev ( [ `-s` , `dir-test/index.ts` ] . join ( ' ' ) ) //.turnOnOutput()
190176 await ps . waitForLine ( / \{ h e l l o : ' w o r l d ' \} / )
191177 t . pass ( 'ok' )
192178 await ps . exit ( )
@@ -199,14 +185,12 @@ test('It should fail if not using --dir or --script-mode on dir-test/index.ts',
199185 `--compiler-options=${ JSON . stringify ( cOptions ) } ` ,
200186 `dir-test/index.ts` ,
201187 ] . join ( ' ' )
202- ) . turnOnOutput ( )
188+ ) // .turnOnOutput()
203189 await ps . waitForLine ( / h a s n o d e f a u l t e x p o r t ./ )
204190 t . pass ( 'ok' )
205191 await ps . exit ( )
206192} )
207193
208-
209-
210194test ( 'It allows to use TS Transformers' , async ( t ) => {
211195 const cOptions = { plugins : [ { transform : 'ts-nameof' , type : 'raw' } ] }
212196 const ps = spawnTsNodeDev (
@@ -301,8 +285,8 @@ test.skip('It should add require with -r flag', async (t) => {
301285 t . end ( )
302286} )
303287
304- test . only ( 'It should handle --deps flag' , async ( t ) => {
305- const ps = spawnTsNodeDev ( [ `--deps` , `--respawn` , `req-package` ] . join ( ' ' ) ) . turnOnOutput ( )
288+ test ( 'It should handle --deps flag' , async ( t ) => {
289+ const ps = spawnTsNodeDev ( [ `--deps` , `--respawn` , `req-package` ] . join ( ' ' ) ) // .turnOnOutput()
306290
307291 await ps . waitForLine ( / P A C K A G E / )
308292
@@ -313,10 +297,11 @@ test.only('It should handle --deps flag', async (t) => {
313297 'PACKAGE' ,
314298 'CHANGED PACKAGE'
315299 ) ,
316- 250
300+ 100
317301 )
318302
319303 await ps . waitForLine ( / C H A N G E D P A C K A G E / )
304+ await ps . exit ( )
320305 t . pass ( )
321306 t . end ( )
322307} )
0 commit comments