mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
94dbaf073b
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.
39 lines
864 B
TypeScript
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',
|
|
],
|
|
},
|
|
},
|
|
});
|