Skip to content

Commit

Permalink
Disable flakey macOS FS events in watcher in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Dec 7, 2017
1 parent 463160b commit e69c83d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ class Bundler extends EventEmitter {
this.farm = WorkerFarm.getShared(this.options);

if (this.options.watch) {
this.watcher = new FSWatcher;
// FS events on macOS are flakey in the tests, which write lots of files very quickly
// See https://github.com/paulmillr/chokidar/issues/612
this.watcher = new FSWatcher({
useFsEvents: process.env.NODE_ENV !== 'test'
});

this.watcher.on('change', this.onChange.bind(this));
}

Expand Down

0 comments on commit e69c83d

Please sign in to comment.