()
| 91 | if (common.isLinux || common.isMacOS || common.isWindows) { |
| 92 | const dir = tmpdir.resolve('watch'); |
| 93 | function doWatch() { |
| 94 | const handle = fs.watch(dir, common.mustCall(function(eventType, filename) { |
| 95 | clearInterval(interval); |
| 96 | handle.close(); |
| 97 | assert.strictEqual(filename, 'foo.txt'); |
| 98 | })); |
| 99 | |
| 100 | const interval = setInterval(() => { |
| 101 | fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustSucceed()); |
| 102 | }, 1); |
| 103 | } |
| 104 | |
| 105 | fs.mkdir(dir, common.mustSucceed(() => { |
| 106 | if (common.isMacOS) { |
no test coverage detected
searching dependent graphs…