Fix PollingFileWatcher.ready for files that don't exist (#157)
There were a few issues here:
- FileWatcher.ready never fired for files that don't exist because of logic inside FileWatcher existing early if the modification time was `null`
- The test I recently added trying to catch this was incorrectly passing because the mock timestamp code was set so that files that had not been created would return a 0-mtime whereas in the real implementation they return `null`
So this change
a) updates the mock to return `null` for uncreated files (to match the real implementation) which breaks a bunch of tests
b) fixes those tests by updating FileWatcher._poll() to handle `null` mtime separately from being the first poll.
4 files changed