/** * 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() })