Files
ReadMeABook/vitest.config.ts
T
kikootwo 94dbaf073b Add backend unit test framework and modularize settings UI
Introduced a Vitest-based backend unit testing framework with supporting scripts, helpers, and GitHub Actions integration. Refactored the admin settings page to a modular architecture, splitting monolithic logic into feature-specific tabs and hooks for improved maintainability and testability. Updated documentation to reflect the new testing setup and settings architecture, and added new dependencies for testing utilities.
2026-01-28 11:41:59 -05:00

39 lines
864 B
TypeScript

/**
* Component: Test Runner Configuration
* Documentation: documentation/README.md
*/
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import path from 'path';
export default defineConfig({
plugins: [tsconfigPaths()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
test: {
environment: 'node',
globals: true,
setupFiles: ['tests/setup.ts'],
include: ['tests/**/*.test.ts', 'tests/**/*.test.tsx'],
clearMocks: true,
mockReset: true,
restoreMocks: true,
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/generated/**',
'src/**/*.d.ts',
'src/**/types/**',
'src/**/types.ts',
'src/**/index.ts',
],
},
},
});