()
| 617 | |
| 618 | describe('QuestionService (broadcasts + dismiss)', () => { |
| 619 | function makeQuestionBroker(): { |
| 620 | broker: QuestionService; |
| 621 | bus: EventService; |
| 622 | broadcast: WSBroadcastService; |
| 623 | clients: FakeSessionClients; |
| 624 | conn: ReturnType<typeof fakeConn>; |
| 625 | } { |
| 626 | const clients = new FakeSessionClients(); |
| 627 | const conn = fakeConn('conn_q_subscriber'); |
| 628 | clients.subscribe(conn, 's'); |
| 629 | const bus = new EventService(); |
| 630 | const broadcast = new WSBroadcastService(bus, testLogger, clients, new FakeConnectionRegistry(), tmpEnv()); |
| 631 | const broker = new QuestionService(testLogger, bus); |
| 632 | return { broker, bus, broadcast, clients, conn }; |
| 633 | } |
| 634 | |
| 635 | function extractQuestionId(sentFrames: unknown[]): string | undefined { |
| 636 | for (const frame of sentFrames) { |
no test coverage detected