diff --git a/packages/jest-core/src/__tests__/watch.test.js b/packages/jest-core/src/__tests__/watch.test.js index a8e505a8f469..6d232c516bb4 100644 --- a/packages/jest-core/src/__tests__/watch.test.js +++ b/packages/jest-core/src/__tests__/watch.test.js @@ -111,7 +111,13 @@ describe('Watch mode flows', () => { beforeEach(() => { isInteractive = true; - jest.doMock('jest-util/build/isInteractive', () => isInteractive); + jest.doMock('jest-util', () => { + const original = jest.requireActual('jest-util'); + return { + ...original, + isInteractive: () => isInteractive, + }; + }); watch = require('../watch').default; const config = { rootDir: __dirname,