test(web): give the admin page mock the fingerprint coverage query
b8855b48 made the admin overview page create a fingerprint coverage
query, but admin.test.ts mocks $lib/api/admin with an explicit factory
that only returned the cover coverage query. Every test that renders
the page threw on the missing export (run 6512, 11 failures). The mock
now returns it in the same empty-store shape, so the gauge stays hidden
in these tests the way the cover gauge does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SQ31KQpYbStyK5y58UmPLH
This commit is contained in:
@@ -35,6 +35,12 @@ vi.mock('$lib/api/admin', async () => {
|
|||||||
isPending: false,
|
isPending: false,
|
||||||
isError: false
|
isError: false
|
||||||
}),
|
}),
|
||||||
|
createFingerprintCoverageQuery: () =>
|
||||||
|
readable({
|
||||||
|
data: undefined,
|
||||||
|
isPending: false,
|
||||||
|
isError: false
|
||||||
|
}),
|
||||||
approveRequest: vi.fn().mockResolvedValue({}),
|
approveRequest: vi.fn().mockResolvedValue({}),
|
||||||
rejectRequest: vi.fn().mockResolvedValue({}),
|
rejectRequest: vi.fn().mockResolvedValue({}),
|
||||||
resolveQuarantine: vi.fn().mockResolvedValue({}),
|
resolveQuarantine: vi.fn().mockResolvedValue({}),
|
||||||
|
|||||||
Reference in New Issue
Block a user