Files
whale-town-end/jest.config.js
moyin 8816b29b0a chore: 更新项目配置和核心服务
- 更新package.json和jest配置
- 更新main.ts启动配置
- 完善用户管理和数据库服务
- 更新安全核心模块
- 优化Zulip核心服务

配置改进:
- 统一项目依赖管理
- 优化测试配置
- 完善服务模块化架构
2026-01-09 17:03:57 +08:00

27 lines
690 B
JavaScript

module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['js', 'json', 'ts'],
roots: ['<rootDir>/src', '<rootDir>/test'],
testRegex: '.*\\.(spec|e2e-spec|integration-spec|perf-spec)\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
collectCoverageFrom: [
'**/*.(t|j)s',
],
coverageDirectory: '../coverage',
testEnvironment: 'node',
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
},
// 添加异步处理配置
testTimeout: 10000,
// 强制退出以避免挂起
forceExit: true,
// 检测打开的句柄
detectOpenHandles: true,
// 处理 ES 模块
transformIgnorePatterns: [
'node_modules/(?!(@faker-js/faker)/)',
],
};