After merging #47, I started getting weird errors on OS X. I think there's some platform-specific nonsense that affects fs.watch from behaving correctly if you're writing to the filesystem very quickly (as the tests do) — sticking a 100ms delay before each function that manipulates the filesystem in the tests appears to fix it. I just hope that's not masking a bug that appears in real-world usage.
In the process of this I added a useChokidar option so that it's possible to test both chokidar and fs.watch (i.e. it's not solely determined by whether or not chokidar can be found). Not that you'd do this in real life, but as of Rollup 0.42 you can pass this option through like so:
After merging #47, I started getting weird errors on OS X. I think there's some platform-specific nonsense that affects
fs.watch
from behaving correctly if you're writing to the filesystem very quickly (as the tests do) — sticking a 100ms delay before each function that manipulates the filesystem in the tests appears to fix it. I just hope that's not masking a bug that appears in real-world usage.In the process of this I added a
useChokidar
option so that it's possible to test bothchokidar
andfs.watch
(i.e. it's not solely determined by whether or notchokidar
can be found). Not that you'd do this in real life, but as of Rollup 0.42 you can pass this option through like so: