vitest.config.ts•1.02 kB
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
setupFiles: ['./vitest.setup.ts'],
include: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/test-utils.ts',
],
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov', 'json-summary'],
reportsDirectory: './coverage',
exclude: [
'node_modules/**',
'dist/**',
'**/*.d.ts',
'**/*.test.ts',
'**/*.spec.ts',
`eslint.config.js`,
'vitest.config.ts',
'vitest.setup.ts',
'**/test-utils.ts',
],
thresholds: {
statements: 50,
branches: 65,
functions: 80,
lines: 50,
},
},
},
});