Version
main
Platform
Subsystem
vfs
What steps will reproduce the bug?
test.js:
const vfs = require('node:vfs');
const fs = require('fs');
const v = vfs.create(new vfs.RealFSProvider('/tmp'));
let called = false;
v.watchFile('/a.txt', { interval: 50 }, () => {
called = true;
});
fs.writeFileSync('/tmp/a.txt', 'x');
setTimeout(() => {
console.log('called?', called);
}, 300);
$ node --experimental-vfs test.js
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
called? true
file changed, the listener should run
What do you see instead?
called? false
Additional information
No response
Version
main
Platform
Subsystem
vfs
What steps will reproduce the bug?
test.js:
$ node --experimental-vfs test.js
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
called? truefile changed, the listener should run
What do you see instead?
called? falseAdditional information
No response