MCPcopy
hub / github.com/deepstreamIO/deepstream.io / received

Function received

test-e2e/framework/event.ts:6–17  ·  view source on GitHub ↗
(clientExpression: string, doesReceive: boolean, subscriptionName: string, data: string)

Source from the content-addressed store, hash-verified

4
5const assert = {
6 received (clientExpression: string, doesReceive: boolean, subscriptionName: string, data: string) {
7 clientHandler.getClients(clientExpression).forEach((client) => {
8 const eventSpy = client.event.callbacks[subscriptionName]
9 if (doesReceive) {
10 sinon.assert.calledOnce(eventSpy)
11 sinon.assert.calledWith(eventSpy, parseData(data))
12 eventSpy.resetHistory()
13 } else {
14 sinon.assert.notCalled(eventSpy)
15 }
16 })
17 },
18}
19
20export const event = {

Callers

nothing calls this directly

Calls 2

parseDataFunction · 0.90
forEachMethod · 0.80

Tested by

no test coverage detected