37 lines
799 B
TypeScript
37 lines
799 B
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(__dirname, './'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./tests/setup.ts'],
|
|
exclude: ['node_modules/**', 'e2e/**', '.next/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html'],
|
|
all: true,
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
include: ['components/**', 'hooks/**', 'lib/**', 'app/**'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'tests/',
|
|
'.next/',
|
|
'coverage/',
|
|
'**/*.test.tsx',
|
|
'**/*.spec.ts',
|
|
],
|
|
},
|
|
},
|
|
})
|