Add type parameters to vi.fn() mocks for oxlint 1.60 vitest rule
CI / backend-test (push) Successful in 1m1s
CI / frontend-test (push) Successful in 32s
CI / frontend-e2e (push) Successful in 1m39s
CI / build-and-publish (push) Has been skipped

oxlint 1.60 enables vitest/require-mock-type-parameters by default,
which requires explicit type parameters on all vi.fn() calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-20 22:42:51 +02:00
parent 8fb1927917
commit d13a5b2113
4 changed files with 35 additions and 33 deletions
@@ -46,7 +46,7 @@ describe('EventStubView', () => {
})
it('copies link to clipboard and shows confirmation', async () => {
const writeTextMock = vi.fn().mockResolvedValue(undefined)
const writeTextMock = vi.fn<(text: string) => Promise<void>>().mockResolvedValue(undefined)
Object.assign(navigator, {
clipboard: { writeText: writeTextMock },
})
@@ -63,7 +63,7 @@ describe('EventStubView', () => {
it('shows failure message when clipboard is unavailable', async () => {
Object.assign(navigator, {
clipboard: { writeText: vi.fn().mockRejectedValue(new Error('Not allowed')) },
clipboard: { writeText: vi.fn<(text: string) => Promise<void>>().mockRejectedValue(new Error('Not allowed')) },
})
const wrapper = await mountWithToken('fail-test')