test: expand endpoint coverage and harden deploy gate
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user