MCPcopy Create free account
hub / github.com/block/buzz / emitMockGlobalEvent

Function emitMockGlobalEvent

desktop/src/testing/e2eBridge.ts:3191–3200  ·  view source on GitHub ↗
(event: RelayEvent)

Source from the content-addressed store, hash-verified

3189}
3190
3191function 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
3202function hasMockLiveSubscription(channelId: string, kind?: number) {
3203 for (const socket of mockSockets.values()) {

Callers 1

sendToMockSocketFunction · 0.85

Calls 1

sendWsTextFunction · 0.85

Tested by

no test coverage detected