Files
Yuzhiran Dev c1d6dd3b29 refactor: 项目架构重构 - 目录标准化 + 清理冗余
- 目录重命名: backend/wdkj-server/ → server/, frontend/ai-dimension/ → client/
- 删除 20+ 冗余文件(WDKJ 旧脚本、Windows 脚本、过时文档、设计稿)
- 更新 package.json 元数据(移除 wdkj 命名)
- 完善三级 .gitignore(根 + server + client)
- 重写 README.md 和 CHANGELOG.md
- 工具脚本移至 scripts/
2026-07-11 12:45:37 +08:00

28 lines
533 B
JavaScript
Executable File

/**
* Jest 测试设置
*/
// 增加测试超时时间
jest.setTimeout(30000)
// 全局清理
afterAll(async () => {
// 关闭所有数据库连接
const mongoose = require('mongoose')
if (mongoose.connection.readyState !== 0) {
await mongoose.connection.close()
}
})
// 抑制控制台日志(测试时)
if (process.env.SUPPRESS_LOGS) {
global.console = {
...console,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn()
}
}