Skip to content

Commit 9401849

Browse files
committed
fixup! vfs: forward the watchFile listener through RealFSProvider
1 parent 66bd9fc commit 9401849

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎test/parallel/test-vfs-real-provider-watch.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ assert.strictEqual(myVfs.provider.supportsWatch, true);
4444
// uv_fs_poll records the first stat asynchronously as the baseline and
4545
// only reports subsequent changes, so mutate the file only after that
4646
// baseline reflects 'a'; otherwise the change is folded into the baseline
47-
// and the listener never fires.
48-
setTimeout(() => fs.writeFileSync(path.join(root, 'wf.txt'), 'b'), 100);
47+
// and the listener never fires. Change the size too, because some
48+
// platforms (e.g. AIX) only report timestamps to the second, so a
49+
// same-size rewrite within that second would look unchanged.
50+
setTimeout(() => fs.writeFileSync(path.join(root, 'wf.txt'), 'bb'), 100);
4951
setTimeout(() => {
5052
myVfs.unwatchFile('/wf.txt', listener);
5153
}, 500);

0 commit comments

Comments
 (0)