import dotenv from 'dotenv'; // 加载测试环境变量 dotenv.config({ path: '.env.test' }); // 设置测试超时 jest.setTimeout(30000); // 全局测试配置 beforeAll(async () => { console.log('🧪 开始测试...'); }); afterAll(async () => { console.log('✅ 测试完成'); });