punimtag/viewer-frontend/vitest.config.ts
ilia 975d0c809d
All checks were successful
CI / skip-ci-check (pull_request) Successful in 5s
CI / docker-ci (pull_request) Successful in 6s
CI / secret-scan (pull_request) Successful in 11s
CI / e2e (pull_request) Successful in 28s
Add Vitest + React Testing Library setup for viewer-frontend
Establishes frontend unit testing infra (jsdom env, RTL, jest-dom
matchers, common Radix/jsdom polyfills) and seeds it with tests for
lib/utils.ts, lib/photo-utils.ts, hooks/useFocusTrap.ts, and
ThemeToggle.tsx (46 tests total).
2026-07-14 18:35:30 -04:00

20 lines
432 B
TypeScript

import path from 'path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./vitest.setup.ts'],
include: ['**/*.test.{ts,tsx}'],
exclude: ['node_modules', '.next', 'e2e'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
});