Initial commit
This commit is contained in:
45
skills/testing-next-stack/assets/vitest.config.ts
Normal file
45
skills/testing-next-stack/assets/vitest.config.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
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')
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user