MCPcopy
hub / github.com/vitest-dev/vitest / unmock

Function unmock

packages/mocker/src/browser/hints.ts:84–91  ·  view source on GitHub ↗
(path: string | Promise<unknown>)

Source from the content-addressed store, hash-verified

82 },
83
84 unmock(path: string | Promise<unknown>): void {
85 if (typeof path !== 'string') {
86 throw new TypeError(
87 `vi.unmock() expects a string path, but received a ${typeof path}`,
88 )
89 }
90 _mocker().queueUnmock(path, getImporter('unmock'))
91 },
92
93 doMock(path: string | Promise<unknown>, factory?: ModuleMockOptions | ModuleMockFactoryWithHelper): void {
94 if (typeof path !== 'string') {

Callers

nothing calls this directly

Calls 3

_mockerFunction · 0.70
getImporterFunction · 0.70
queueUnmockMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…