@@ -44,7 +44,7 @@ test('It should restart on file change', async (t) => {
44
44
} )
45
45
46
46
test ( 'It allow watch arbitrary folder/file' , async ( t ) => {
47
- const ps = spawnTsNodeDev ( '--respawn --watch folder,folder2 simple.ts' ) //.turnOnOutput()
47
+ const ps = spawnTsNodeDev ( '--respawn --watch folder,folder2 simple.ts' ) //.turnOnOutput()
48
48
await ps . waitForLine ( / U s i n g / )
49
49
setTimeout ( ( ) => touch ( join ( scriptsDir , 'folder/some-file' ) ) , 250 )
50
50
await ps . waitForLine ( / R e s t a r t i n g .* s o m e - f i l e / )
@@ -149,7 +149,7 @@ test('It handles resolveJsonModule option and loads JSON modules', async (t) =>
149
149
`--compiler-options=${ JSON . stringify ( cOptions ) } ` ,
150
150
`import-json` ,
151
151
] . join ( ' ' )
152
- ) //.turnOnOutput()
152
+ ) //.turnOnOutput()
153
153
await ps . waitForLine ( / J S O N D A T A : { f i l e : ' j s o n ' } / )
154
154
t . pass ( 'ok' )
155
155
await ps . exit ( )
@@ -237,7 +237,7 @@ test.skip('It should add require with -r flag', async (t) => {
237
237
//`--debug`,
238
238
`simple` ,
239
239
] . join ( ' ' )
240
- ) . turnOnOutput ( )
240
+ ) // .turnOnOutput()
241
241
await ps . waitForLine ( / a d d e d - - r e q u i r e / )
242
242
await ps . waitForLine ( / v 1 / )
243
243
@@ -248,3 +248,23 @@ test.skip('It should add require with -r flag', async (t) => {
248
248
t . pass ( )
249
249
t . end ( )
250
250
} )
251
+
252
+ test . only ( 'It should handle --deps flag' , async ( t ) => {
253
+ const ps = spawnTsNodeDev ( [ `--deps` , `--respawn` , `req-package` ] . join ( ' ' ) ) . turnOnOutput ( )
254
+
255
+ await ps . waitForLine ( / P A C K A G E / )
256
+
257
+ setTimeout (
258
+ ( ) =>
259
+ replaceText (
260
+ 'node_modules/package/index.js' ,
261
+ 'PACKAGE' ,
262
+ 'CHANGED PACKAGE'
263
+ ) ,
264
+ 250
265
+ )
266
+
267
+ await ps . waitForLine ( / C H A N G E D P A C K A G E / )
268
+ t . pass ( )
269
+ t . end ( )
270
+ } )
0 commit comments