()
| 521 | |
| 522 | describe('ApprovalService (broadcasts + resolve-by-approval_id)', () => { |
| 523 | function makeBrokerWithBus(): { |
| 524 | broker: ApprovalService; |
| 525 | bus: EventService; |
| 526 | broadcast: WSBroadcastService; |
| 527 | clients: FakeSessionClients; |
| 528 | conn: ReturnType<typeof fakeConn>; |
| 529 | } { |
| 530 | const clients = new FakeSessionClients(); |
| 531 | const conn = fakeConn('conn_subscriber'); |
| 532 | clients.subscribe(conn, 'sess_1'); |
| 533 | const bus = new EventService(); |
| 534 | const broadcast = new WSBroadcastService(bus, testLogger, clients, new FakeConnectionRegistry(), tmpEnv()); |
| 535 | const broker = new ApprovalService(testLogger, bus); |
| 536 | return { broker, bus, broadcast, clients, conn }; |
| 537 | } |
| 538 | |
| 539 | function extractApprovalId(sentFrames: unknown[]): string | undefined { |
| 540 | for (const frame of sentFrames) { |
no test coverage detected