File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -423,11 +423,10 @@ function watchFiles(testFiles, opts) {
423423 opts . root . harness . watching = true ;
424424 // Watch for changes in current filtered files
425425 watcher . on ( 'changed' , ( { owners, eventType } ) => {
426- if ( ! opts . hasFiles && eventType === 'rename' ) {
426+ if ( ! opts . hasFiles && ( eventType === 'rename' || eventType === 'change' ) ) {
427427 const updatedTestFiles = createTestFileList ( opts . globPatterns ) ;
428428
429429 const newFileName = ArrayPrototypeFind ( updatedTestFiles , ( x ) => ! ArrayPrototypeIncludes ( testFiles , x ) ) ;
430- const previousFileName = ArrayPrototypeFind ( testFiles , ( x ) => ! ArrayPrototypeIncludes ( updatedTestFiles , x ) ) ;
431430
432431 // When file renamed (created / deleted) we need to update the watcher
433432 if ( newFileName ) {
@@ -439,7 +438,6 @@ function watchFiles(testFiles, opts) {
439438 return ; // Avoid rerunning files when file deleted
440439 }
441440
442-
443441 testFiles = updatedTestFiles ;
444442 }
445443
You can’t perform that action at this time.
0 commit comments