30 lines
739 B
TypeScript
Executable file
30 lines
739 B
TypeScript
Executable file
/**
|
|
* Example Vitest Setup File
|
|
*
|
|
* Copy this file to your app as `vitest.setup.ts` and customize as needed.
|
|
* This file runs before each test file.
|
|
*/
|
|
|
|
import '@testing-library/jest-dom/vitest'
|
|
import {
|
|
mockMatchMedia,
|
|
mockIntersectionObserver,
|
|
mockResizeObserver,
|
|
mockScrollTo,
|
|
} from '@lilith/test-utils'
|
|
|
|
// Mock common browser APIs
|
|
mockMatchMedia()
|
|
mockIntersectionObserver()
|
|
mockResizeObserver()
|
|
mockScrollTo()
|
|
|
|
// Optional: Setup MSW
|
|
// import { setupMSW } from '@lilith/test-utils'
|
|
// import { server } from './test/msw-server'
|
|
// setupMSW(server)
|
|
|
|
// Optional: Mock localStorage/sessionStorage
|
|
// import { mockLocalStorage, mockSessionStorage } from '@lilith/test-utils'
|
|
// mockLocalStorage()
|
|
// mockSessionStorage()
|