46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./test/setup.ts'],
|
|
include: ['**/*.{test,spec}.{ts,tsx}'],
|
|
exclude: ['node_modules', 'dist', '.next', 'test/e2e/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'test/',
|
|
'**/*.config.{ts,js}',
|
|
'**/*.d.ts',
|
|
'.next/',
|
|
'dist/',
|
|
'public/',
|
|
'**/__mocks__/**',
|
|
'**/types/**'
|
|
],
|
|
thresholds: {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80
|
|
}
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@/components': path.resolve(__dirname, './src/components'),
|
|
'@/lib': path.resolve(__dirname, './src/lib'),
|
|
'@/hooks': path.resolve(__dirname, './src/hooks'),
|
|
'@/types': path.resolve(__dirname, './src/types'),
|
|
'@/test': path.resolve(__dirname, './test')
|
|
}
|
|
}
|
|
})
|