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

Method createMockFromModule

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

* Given the name of a module, use the automatic mocking system to generate a * mocked version of the module for you. * * This is useful when you want to create a manual mock that extends the * automatic mock's behavior.

(moduleName: string)

Source from the content-addressed store, hash-verified

124 * automatic mock's behavior.
125 */
126 createMockFromModule<T = unknown>(moduleName: string): Mocked<T>;
127 /**
128 * Indicates that the module system should never return a mocked version of
129 * the specified module and its dependencies.

Callers 13

os.jsFile · 0.80
fs.jsFile · 0.80
worker.test.jsFile · 0.80
jest.test.tsFile · 0.80
lodash.jsFile · 0.80
fs.jsFile · 0.80
user.jsFile · 0.80
partial_mock.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected