Vitest · Method
vi.hoisted
vi.hoisted runs a factory before static imports are evaluated. It returns the factory result, which can provide values to a hoisted vi.mock factory.
Last updated
Syntax
function hoisted<T>(factory: () => T): TIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
vi.mockvi.doMockvi.resetModulesvi.importActual