Files
jinshen-website/vitest.config.ts
R2m1liA d7bd034d7d
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m5s
test: 优化测试代码
- 显式导入相关依赖以避免相关问题
2025-11-14 12:23:49 +08:00

37 lines
797 B
TypeScript

import { defineConfig } from 'vitest/config';
import { defineVitestProject } from '@nuxt/test-utils/config';
export default defineConfig({
test: {
globals: true,
projects: [
{
test: {
name: 'unit',
include: [
'app/**/*.test.ts',
'app/**/*.spec.ts',
'server/**/*.test.ts',
'server/**/*.spec.ts',
],
environment: 'node',
},
},
await defineVitestProject({
test: {
name: 'nuxt',
include: ['tests/nuxt/**/*.{test,spec}.ts'],
environment: 'nuxt',
},
}),
{
test: {
name: 'e2e',
include: ['test/e2e/*.{test,spec}.ts'],
environment: 'node',
},
},
],
},
});