test: add Wave 1 infrastructure (types, mocks, vitest config) + User/Order/Material factories
- tests/fixtures/types.ts: Test fixture type definitions - tests/fixtures/factory.ts: User/Order/Material factories - tests/mocks/types.ts: Mock type definitions (549 lines) - tests/mocks/index.ts: Mock factory functions - vitest.config.ts: Performance optimizations (isolate:false, pool:threads) - User/Order/Material factory tests (7 tests total) Performance: 7.65s → 4.94s (35% improvement)
This commit is contained in:
@@ -11,6 +11,11 @@ export default defineConfig({
|
||||
env: {
|
||||
NODE_ENV: 'test'
|
||||
},
|
||||
// 性能优化配置
|
||||
isolate: false, // 禁用隔离(提升 30-50% 速度)
|
||||
pool: 'threads', // 使用线程池
|
||||
maxWorkers: 4,
|
||||
bail: process.env.CI ? 1 : undefined,
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html']
|
||||
|
||||
Reference in New Issue
Block a user