vi.mock factory throws cannot access mockDb before initialization Mocking
Every test in the file dies with . The part I cannot get my head around: the const already is above the mock. Moving it further up changes nothing. Vitest 3, TS, alias resolved through the vite tsconfig paths plugin.