test: refactor test-fs-watchfile.js
The test no longer waits about 5 seconds between callback invocations. On my laptop, the test had been taking over 5 seconds to run. Now it takes less than 150ms.
The test had also been writing to and deleting from the fixtures directory. It now uses the tmp directory instead.
(An aside: Does anyone know why the Python test wrapper uses duration_ms
for durations that are in seconds and not milliseconds? Is that a straight up error or am I just misunderstanding the ms
part? This has been bugging me for a long time, but I'm not sure what unintended consequences might lurk if we slice off the _ms
or change it to just _s
. It seems like there might be some CI or smoke test stuff that expects specific strings and whatnot.)