#mocking

2 entries tagged “mocking”.

vitest

Vitest: vi.mocked(...).mockResolvedValue is not a function

Vitest 3 test fails with vi.mocked(...).mockResolvedValue is not a function after restoreAllMocks. Here's how to fix it in one line.

Read the entry →
vitest

Vitest 4 tests pass locally but fail in CI

Bumping Vitest from 3 to 4 turned my git-proxy CI red while local stayed green. Stale node_modules, broken class mocks, and port clashes. Here's how I fixed each.

Read the entry →