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

Method requireMock

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

* Returns a mock module instead of the actual module, bypassing all checks * on whether the module should be required normally or not.

(moduleName: string)

Source from the content-addressed store, hash-verified

277 * on whether the module should be required normally or not.
278 */
279 requireMock<T = unknown>(moduleName: string): T;
280 /**
281 * Resets the state of all mocks. Equivalent to calling `.mockReset()` on
282 * every mocked function.

Callers 3

jest.test.tsFile · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected