/** * Shared mock config factory for RCS tests. * Replaces the 18 inline `mockConfig` declarations across test files. */ export function createMockConfig(overrides?: Partial>) { return { port: 3000, host: '0.0.0.0', apiKeys: ['test-api-key'], baseUrl: 'http://localhost:3000', pollTimeout: 8, heartbeatInterval: 20, jwtExpiresIn: 3600, disconnectTimeout: 300, webCorsOrigins: [], wsIdleTimeout: 30, wsKeepaliveInterval: 20, ...overrides, } } /** * Build the module shape for `mock.module('../config', ...)`. */ export function mockConfigModule(overrides?: Partial>) { const config = createMockConfig(overrides) return { config, getBaseUrl: () => config.baseUrl || 'http://localhost:3000', } }