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

Method resetModules

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

* Resets the module registry - the cache of all required modules. This is * useful to isolate modules where local state might conflict between tests.

()

Source from the content-addressed store, hash-verified

287 * useful to isolate modules where local state might conflict between tests.
288 */
289 resetModules(): Jest;
290 /**
291 * Restores all mocks and replaced properties back to their original value.
292 * Equivalent to calling `.mockRestore()` on every mocked function

Callers 15

jestAdapterFunction · 0.65
watch.test.jsFile · 0.65
index.test.tsFile · 0.65
index.test.tsFile · 0.65

Calls

no outgoing calls

Tested by 1

resetFunction · 0.52