MCPcopy
hub / github.com/jestjs/jest / doMock

Method doMock

packages/jest-environment/src/index.ts:144–144  ·  view source on GitHub ↗

* When using `babel-jest`, calls to `jest.mock()` will automatically be hoisted * to the top of the code block. Use this method if you want to explicitly * avoid this behavior.

(
    moduleName: string,
    moduleFactory?: () => T,
    options?: {virtual?: boolean},
  )

Source from the content-addressed store, hash-verified

142 * avoid this behavior.
143 */
144 doMock<T = unknown>(
145 moduleName: string,
146 moduleFactory?: () => T,
147 options?: {virtual?: boolean},

Callers 12

normalize.test.tsFile · 0.80
watch.test.jsFile · 0.80
resolve.test.tsFile · 0.80
buildPromiseFunction · 0.80
jest.test.tsFile · 0.80
defineTestsFunction · 0.80
mock_per_test.jsFile · 0.80

Calls

no outgoing calls

Tested by 2

buildPromiseFunction · 0.64
defineTestsFunction · 0.64