@@ -44,7 +44,7 @@ test('It should restart on file change', async (t) => {
4444} )
4545
4646test ( '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()
4848 await ps . waitForLine ( / U s i n g / )
4949 setTimeout ( ( ) => touch ( join ( scriptsDir , 'folder/some-file' ) ) , 250 )
5050 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) =>
149149 `--compiler-options=${ JSON . stringify ( cOptions ) } ` ,
150150 `import-json` ,
151151 ] . join ( ' ' )
152- ) //.turnOnOutput()
152+ ) //.turnOnOutput()
153153 await ps . waitForLine ( / J S O N D A T A : { f i l e : ' j s o n ' } / )
154154 t . pass ( 'ok' )
155155 await ps . exit ( )
@@ -237,7 +237,7 @@ test.skip('It should add require with -r flag', async (t) => {
237237 //`--debug`,
238238 `simple` ,
239239 ] . join ( ' ' )
240- ) . turnOnOutput ( )
240+ ) // .turnOnOutput()
241241 await ps . waitForLine ( / a d d e d - - r e q u i r e / )
242242 await ps . waitForLine ( / v 1 / )
243243
@@ -248,3 +248,23 @@ test.skip('It should add require with -r flag', async (t) => {
248248 t . pass ( )
249249 t . end ( )
250250} )
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