message: chore: prevent max listeners warning in tests
diff: *
  */
  -'use strict';
  -
  import chalk from 'chalk';
  import TestWatcher from '../TestWatcher';
  import {JestHook, KEYS} from 'jest-watcher';
  @@ -93,6 +91,14 @@ jest.doMock('../lib/update_global_config', () => updateGlobalConfig);
  const nextTick = () => new Promise(res => process.nextTick(res));
  +beforeAll(() => {
  + jest.spyOn(process, 'on').mockImplementation(() => {});
  +});
  +
  +afterAll(() => {
  + jest.restoreAllMocks();
  +});
  +
  afterEach(runJestMock.mockReset);
  describe('Watch mode flows', () => {
  