File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,20 +53,17 @@ describe('watcher', () => {
5353
5454 // $FlowIgnore: retrieve internal Watchpack properties for testing purpose.
5555 const { fileWatchers, directoryWatchers} = watcher ;
56- let watchedFile ;
57- let watchedDir ;
56+ let watchedFilePath ;
57+ let watchedDirPath ;
5858
5959 if ( fileWatchers ?. size > 0 ) {
60- watchedFile = Array . from ( fileWatchers . values ( ) ) [ 0 ] ;
60+ watchedFilePath = Array . from ( fileWatchers . keys ( ) ) [ 0 ] ;
6161 }
6262
6363 if ( directoryWatchers ?. size > 0 ) {
64- watchedDir = Array . from ( directoryWatchers . values ( ) ) [ 0 ] ;
64+ watchedDirPath = Array . from ( directoryWatchers . keys ( ) ) [ 0 ] ;
6565 }
6666
67- const watchedFilePath = watchedFile && watchedFile . path ;
68- const watchedDirPath = watchedDir && watchedDir . path ;
69-
7067 await fs . utimes ( someFile , Date . now ( ) / 1000 , Date . now ( ) / 1000 ) ;
7168 const assertParams = {
7269 onChange,
You can’t perform that action at this time.
0 commit comments