()
| 32 | |
| 33 | let changes = 0; |
| 34 | function watchFile() { |
| 35 | fs.watchFile(f, (curr, prev) => { |
| 36 | // Make sure there is at least one watch event that shows a changed mtime. |
| 37 | if (curr.mtime <= prev.mtime) { |
| 38 | return; |
| 39 | } |
| 40 | changes++; |
| 41 | fs.unwatchFile(f); |
| 42 | watchFile(); |
| 43 | fs.unwatchFile(f); |
| 44 | }); |
| 45 | } |
| 46 | |
| 47 | watchFile(); |
| 48 |
no test coverage detected
searching dependent graphs…