Skip to content

Commit e69c83d

Browse files
committed
Disable flakey macOS FS events in watcher in the tests
1 parent 463160b commit e69c83d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Bundler.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ class Bundler extends EventEmitter {
153153
this.farm = WorkerFarm.getShared(this.options);
154154

155155
if (this.options.watch) {
156-
this.watcher = new FSWatcher;
156+
// FS events on macOS are flakey in the tests, which write lots of files very quickly
157+
// See https://github.com/paulmillr/chokidar/issues/612
158+
this.watcher = new FSWatcher({
159+
useFsEvents: process.env.NODE_ENV !== 'test'
160+
});
161+
157162
this.watcher.on('change', this.onChange.bind(this));
158163
}
159164

0 commit comments

Comments
 (0)