49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
|
|
import { defineConfig } from 'vitest/config';
|
||
|
|
import react from '@vitejs/plugin-react';
|
||
|
|
import path from 'path';
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@/': path.resolve(import.meta.dirname, 'src') + '/',
|
||
|
|
'@meshitrack/shared': path.resolve(import.meta.dirname, '../shared/src'),
|
||
|
|
},
|
||
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
||
|
|
},
|
||
|
|
test: {
|
||
|
|
globals: true,
|
||
|
|
environment: 'jsdom',
|
||
|
|
include: ['src/**/*.test.{ts,tsx}'],
|
||
|
|
setupFiles: ['./vitest.setup.ts'],
|
||
|
|
css: false,
|
||
|
|
coverage: {
|
||
|
|
provider: 'v8',
|
||
|
|
enabled: false,
|
||
|
|
include: ['src/**/*.{ts,tsx}'],
|
||
|
|
exclude: [
|
||
|
|
'src/**/*.test.{ts,tsx}',
|
||
|
|
'src/test-utils.tsx',
|
||
|
|
'src/mocks/**',
|
||
|
|
'src/app/layout.tsx',
|
||
|
|
'src/app/api/**',
|
||
|
|
'src/lib/auth.ts',
|
||
|
|
'src/proxy.ts',
|
||
|
|
'src/**/*.d.ts',
|
||
|
|
'src/app/(dashboard)/layout.tsx',
|
||
|
|
'src/components/**',
|
||
|
|
'src/app/login/**',
|
||
|
|
],
|
||
|
|
reporter: ['text', 'lcov', 'json-summary', 'html'],
|
||
|
|
reportsDirectory: './coverage',
|
||
|
|
thresholds: {
|
||
|
|
lines: 24,
|
||
|
|
functions: 18,
|
||
|
|
branches: 18,
|
||
|
|
statements: 24,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
testTimeout: 10_000,
|
||
|
|
},
|
||
|
|
});
|