This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -11,7 +11,7 @@ class MockLifecycleEmitter implements IAutomationLifecycleEmitter {
offLifecycle(cb: LifecycleCallback): void {
this.callbacks.delete(cb)
}
async emit(event: any) {
async emit(event: { type: string; actionId: string; timestamp: number }) {
for (const cb of Array.from(this.callbacks)) {
cb(event)
}
@@ -21,7 +21,11 @@ class MockLifecycleEmitter implements IAutomationLifecycleEmitter {
describe('OverlaySyncService timeout (unit)', () => {
test('startAction with short timeout resolves as tentative when no events', async () => {
const emitter = new MockLifecycleEmitter()
const svc = new OverlaySyncService({ lifecycleEmitter: emitter as any, logger: console as any, publisher: { publish: async () => {} } as any })
const svc = new OverlaySyncService({
lifecycleEmitter: emitter,
logger: console,
publisher: { publish: async () => {} },
})
const action: OverlayAction = { id: 'add-car', label: 'Adding...', timeoutMs: 50 }