Summary
src/context/auth.test.tsx currently drives the AuthProvider denied state via a resolved response with no operator, because a rejected-promise mock trips a Vitest 3.2.7 / tinyspy false "unhandled rejection" failure (interaction with mockReset() in beforeEach). The provider's .catch branch (the real CodeUnauthenticated path) is therefore not directly covered.
Fix options
- Restructure the test to use a fresh
vi.fn() per test instead of beforeEach(mockReset).
- Or revisit after a Vitest upgrade (4.x) where the artifact may be resolved.
Low risk: the .catch branch is a one-line setState identical to the covered no-operator branch, and the real cert-absent flow exercises it live. Deferred from #47 (Slice A).
Summary
src/context/auth.test.tsxcurrently drives the AuthProvider denied state via a resolved response with no operator, because a rejected-promise mock trips a Vitest 3.2.7 / tinyspy false "unhandled rejection" failure (interaction withmockReset()inbeforeEach). The provider's.catchbranch (the real CodeUnauthenticated path) is therefore not directly covered.Fix options
vi.fn()per test instead ofbeforeEach(mockReset).Low risk: the
.catchbranch is a one-linesetStateidentical to the covered no-operator branch, and the real cert-absent flow exercises it live. Deferred from #47 (Slice A).