glam/apps/archief-assistent/tests/setup.ts
2026-01-10 14:14:04 +01:00

20 lines
369 B
TypeScript

/**
* Vitest test setup file
*
* This file runs before each test file and sets up the test environment.
*/
import { vi, beforeEach, afterAll } from 'vitest'
// Mock fetch for vocabulary loading
global.fetch = vi.fn()
// Reset mocks between tests
beforeEach(() => {
vi.resetAllMocks()
})
// Clean up after all tests
afterAll(() => {
vi.restoreAllMocks()
})