Jest · Method
jest.doMock
jest.doMock() registers a module mock without the automatic hoisting used by jest.mock() with babel-jest. It is useful when different tests in one file need different mock implementations.
Last updated
Syntax
jest.doMock(moduleName, factory, options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
jest.mockjest.resetModulesjest.dontMockjest.requireActual