37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
/**
|
|
* E2E Test Setup
|
|
*
|
|
* Sets environment variables for test isolation:
|
|
* - PostgreSQL on port 25436 (test isolation)
|
|
* - Redis on port 26383 (test isolation)
|
|
* - Test database name
|
|
* - Test API keys
|
|
*/
|
|
|
|
// Set test environment variables
|
|
process.env.NODE_ENV = 'test';
|
|
process.env.INTERNAL_API_KEY = 'test-internal-api-key';
|
|
process.env.EMAIL_UNSUBSCRIBE_SECRET = 'test-secret-key';
|
|
|
|
// Database configuration (test isolation)
|
|
process.env.DATABASE_POSTGRES_USER = 'lilith';
|
|
process.env.DATABASE_POSTGRES_PASSWORD = 'lilith';
|
|
process.env.DATABASE_POSTGRES_NAME = 'lilith_email_test';
|
|
|
|
// SMTP configuration (test/mock)
|
|
process.env.SMTP_HOST = 'smtp.test.example.com';
|
|
process.env.SMTP_PORT = '587';
|
|
process.env.SMTP_USER = 'test@example.com';
|
|
process.env.SMTP_PASS = 'test-password';
|
|
process.env.SMTP_FROM = 'noreply@lilith.gg';
|
|
process.env.SMTP_FROM_NAME = 'Lilith Platform';
|
|
|
|
// Suppress console logs during tests (uncomment for debugging)
|
|
// global.console = {
|
|
// ...console,
|
|
// log: vi.fn(),
|
|
// debug: vi.fn(),
|
|
// info: vi.fn(),
|
|
// warn: vi.fn(),
|
|
// error: vi.fn(),
|
|
// };
|