001project_wildgrowth/backend/src/__tests__/setup.ts

13 lines
427 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Jest 测试环境设置
*/
// 设置测试环境变量
process.env.NODE_ENV = 'test';
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL || 'postgresql://postgres:postgres@localhost:5432/wildgrowth_test';
process.env.JWT_SECRET = 'test-secret-key';
process.env.DEEPSEEK_API_KEY = process.env.DEEPSEEK_API_KEY || 'test-key';
// 增加超时时间用于AI和向量化测试
jest.setTimeout(60000); // 60秒