(event: RelayEvent)
| 3189 | } |
| 3190 | |
| 3191 | function emitMockGlobalEvent(event: RelayEvent) { |
| 3192 | for (const socket of mockSockets.values()) { |
| 3193 | for (const [subId, subscription] of socket.subscriptions) { |
| 3194 | if (subscription.kinds && !subscription.kinds.includes(event.kind)) { |
| 3195 | continue; |
| 3196 | } |
| 3197 | sendWsText(socket.handler, ["EVENT", subId, event]); |
| 3198 | } |
| 3199 | } |
| 3200 | } |
| 3201 | |
| 3202 | function hasMockLiveSubscription(channelId: string, kind?: number) { |
| 3203 | for (const socket of mockSockets.values()) { |
no test coverage detected