vitest.config.ts•685 B
import path from 'node:path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: ['node_modules/', 'tests/', 'dist/', '**/*.d.ts', '**/*.config.*', '**/index.ts'],
},
include: ['tests/**/*.test.ts'],
alias: {
'fs-extra': path.resolve(__dirname, './tests/__mocks__/fs-extra.ts'),
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'fs-extra': path.resolve(__dirname, './tests/__mocks__/fs-extra.ts'),
},
},
});