You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1023 B
39 lines
1023 B
import { join } from 'node:path';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': join(__dirname, 'src'),
|
|
'@root': join(__dirname),
|
|
'@@': join(__dirname, 'src', '.umi'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
setupFiles: ['./tests/setupTests.ts'],
|
|
include: ['src/**/*.{test,spec}.{ts,tsx}'],
|
|
// Exclude Umi integration tests that depend on @umijs/max test infrastructure
|
|
// These require Umi's Jest runner and cannot be used with Vitest directly
|
|
exclude: [
|
|
'src/pages/user/login/login.test.tsx',
|
|
'node_modules',
|
|
'dist',
|
|
'.umi',
|
|
],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: [
|
|
'src/.umi/**',
|
|
'src/services/ant-design-pro/**',
|
|
'src/**/*.d.ts',
|
|
'src/**/index.style.ts',
|
|
],
|
|
},
|
|
passWithNoTests: true,
|
|
testTimeout: 15000,
|
|
},
|
|
});
|
|
|