platform-codebase/features/platform-analytics/backend-api/test/setup.ts
Lilith 2438db1213 chore(features): 🔧 Update TypeScript files in feature directory
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-01-31 17:20:49 -08:00

32 lines
823 B
TypeScript

import 'reflect-metadata';
// Configure test environment
process.env.NODE_ENV = 'test';
process.env.REDIS_URL = '';
process.env.DISABLE_QUEUES = 'true';
process.env.LILITH_PROJECT_ROOT = '/var/home/lilith/Code/@projects/@lilith/lilith-platform';
// Mock service registry to avoid file system dependencies
vi.mock('@lilith/service-registry', () => ({
buildDeploymentRegistry: () => ({
services: new Map([
['atlilith.www.postgresql', { localUrl: 'http://localhost:25432' }],
]),
}),
getDatabaseConfig: () => ({
host: 'localhost',
port: 25432,
username: 'test',
password: 'test',
database: 'test_analytics',
}),
}));
// Mock domain events
vi.mock('@lilith/domain-events', () => ({
DomainEvents: {
publish: vi.fn(),
subscribe: vi.fn(),
unsubscribe: vi.fn(),
},
}));