@@ -791,54 +791,4 @@ process.on('message', (message) => {
791
791
`Completed running ${ inspect ( file ) } . Waiting for file changes before restarting...` ,
792
792
] ) ;
793
793
} ) ;
794
-
795
- it ( 'when multiple `--watch` flags are provided should run as if only one was' , async ( ) => {
796
- const projectDir = tmpdir . resolve ( 'project-multi-flag' ) ;
797
- mkdirSync ( projectDir ) ;
798
-
799
- const file = createTmpFile ( `
800
- console.log(
801
- process.argv.some(arg => arg === '--watch')
802
- ? 'Error: unexpected --watch args present'
803
- : 'no --watch args present'
804
- );` , '.js' , projectDir ) ;
805
- const args = [ '--watch' , '--watch' , file ] ;
806
- const { stdout, stderr } = await runWriteSucceed ( {
807
- file, watchedFile : file , watchFlag : null , args, options : { cwd : projectDir }
808
- } ) ;
809
-
810
- assert . strictEqual ( stderr , '' ) ;
811
- assert . deepStrictEqual ( stdout , [
812
- 'no --watch args present' ,
813
- `Completed running ${ inspect ( file ) } ` ,
814
- `Restarting ${ inspect ( file ) } ` ,
815
- 'no --watch args present' ,
816
- `Completed running ${ inspect ( file ) } ` ,
817
- ] ) ;
818
- } ) ;
819
-
820
- it ( '`--watch-path` ars without `=` used alongside `--watch` should not make it into the script' , async ( ) => {
821
- const projectDir = tmpdir . resolve ( 'project-watch-watch-path-args' ) ;
822
- mkdirSync ( projectDir ) ;
823
-
824
- const file = createTmpFile ( `
825
- console.log(
826
- process.argv.slice(2).some(arg => arg.endsWith('.js'))
827
- ? 'some cli args end with .js'
828
- : 'no cli arg ends with .js'
829
- );` , '.js' , projectDir ) ;
830
- const args = [ '--watch' , `--watch-path` , file , file ] ;
831
- const { stdout, stderr } = await runWriteSucceed ( {
832
- file, watchedFile : file , watchFlag : null , args, options : { cwd : projectDir }
833
- } ) ;
834
-
835
- assert . strictEqual ( stderr , '' ) ;
836
- assert . deepStrictEqual ( stdout , [
837
- 'no cli arg ends with .js' ,
838
- `Completed running ${ inspect ( file ) } ` ,
839
- `Restarting ${ inspect ( file ) } ` ,
840
- 'no cli arg ends with .js' ,
841
- `Completed running ${ inspect ( file ) } ` ,
842
- ] ) ;
843
- } ) ;
844
794
} ) ;
0 commit comments