Cover frontend middleware auth/locale logic, i18n config/routing/request/navigation, and vi/en message parity — 91 new tests across 6 files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import path from 'path';
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
include: ['**/__tests__/**/*.spec.ts', '**/__tests__/**/*.test.ts', '**/__tests__/**/*.spec.tsx', '**/__tests__/**/*.test.tsx'],
|
|
exclude: ['**/node_modules/**'],
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
globals: true,
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'text-summary', 'json-summary', 'lcov', 'clover'],
|
|
reportsDirectory: './coverage',
|
|
include: [
|
|
'app/**/*.ts',
|
|
'app/**/*.tsx',
|
|
'components/**/*.ts',
|
|
'components/**/*.tsx',
|
|
'lib/**/*.ts',
|
|
'hooks/**/*.ts',
|
|
],
|
|
exclude: [
|
|
'**/*.spec.ts',
|
|
'**/*.spec.tsx',
|
|
'**/*.test.ts',
|
|
'**/*.test.tsx',
|
|
'**/__tests__/**',
|
|
'**/__mocks__/**',
|
|
'**/node_modules/**',
|
|
'app/**/layout.tsx',
|
|
'app/**/loading.tsx',
|
|
'app/**/error.tsx',
|
|
'app/**/not-found.tsx',
|
|
],
|
|
thresholds: {
|
|
statements: 60,
|
|
branches: 50,
|
|
functions: 60,
|
|
lines: 60,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, '.'),
|
|
},
|
|
},
|
|
});
|