test: expand endpoint coverage and harden deploy gate
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 15s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-05-21 08:03:59 +02:00
parent 5fce08ab75
commit 19d7aeefb0
10 changed files with 1013 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
import { vi } from 'vitest'
import { vi, beforeAll, afterAll, beforeEach } from 'vitest'
type CookieStore = Record<string, { value: string; options?: Record<string, any> }>
@@ -129,6 +129,15 @@ export const mockSuccessReadBody = (payload: any) => {
(global.readBody as any).mockResolvedValue(payload)
}
beforeAll(() => {
vi.spyOn(console, 'error').mockImplementation(() => {})
vi.spyOn(console, 'warn').mockImplementation(() => {})
})
afterAll(() => {
vi.restoreAllMocks()
})
beforeEach(() => {
resetEventMocks()
})