Vitest · Pipe
test.deps
vi.doMock replaces a module for the next dynamic import. It is not hoisted, so its factory can use variables from the file scope.
Last updated
Syntax
vi.doMock(path, factory?)
vi.doMock(module, factory?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
vivi.mockMockOptionsMockFactoryDisposable