@@ -14,25 +14,30 @@ const EXPECTED_MESSAGE = 'Fake Firefox binary executed correctly.';
14
14
15
15
describe ( 'web-ext run' , ( ) => {
16
16
17
- it ( 'accepts: --no-reload --watch-file --source-dir SRCDIR ' +
18
- '--firefox FXPATH --watch-ignored' ,
17
+ it ( 'accepts: --no-reload --watch-file --watch-files -- source-dir ' +
18
+ 'SRCDIR --firefox FXPATH --watch-ignored' ,
19
19
( ) => withTempAddonDir (
20
20
{ addonPath : minimalAddonPath } ,
21
21
( srcDir ) => {
22
22
const watchedFile = path . join ( srcDir , 'watchedFile.txt' ) ;
23
+ const watchedFilesArr = [ 'watchedFile1' , 'watchedFile2' ] . map (
24
+ ( file ) => path . join ( srcDir , file )
25
+ ) ;
23
26
const watchIgnoredArr = [ 'ignoredFile1.txt' , 'ignoredFile2.txt' ] . map (
24
27
( file ) => path . join ( srcDir , file )
25
28
) ;
26
29
const watchIgnoredFile = path . join ( srcDir , 'ignoredFile3.txt' ) ;
27
30
28
31
fs . writeFileSync ( watchedFile , '' ) ;
32
+ watchedFilesArr . forEach ( ( file ) => fs . writeFileSync ( file , '' ) ) ;
29
33
watchIgnoredArr . forEach ( ( file ) => fs . writeFileSync ( file , '' ) ) ;
30
34
fs . writeFileSync ( watchIgnoredFile , '' ) ;
31
35
32
36
const argv = [
33
37
'run' , '--verbose' , '--no-reload' ,
34
38
'--source-dir' , srcDir ,
35
39
'--watch-file' , watchedFile ,
40
+ '--watch-files' , ...watchedFilesArr ,
36
41
'--firefox' , fakeFirefoxPath ,
37
42
'--watch-ignored' , ...watchIgnoredArr ,
38
43
'--watch-ignored' , watchIgnoredFile ,
0 commit comments