Function
received
(clientExpression: string, doesReceive: boolean, subscriptionName: string, data: string)
Source from the content-addressed store, hash-verified
| 4 | |
| 5 | const 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 | |
| 20 | export const event = { |
Callers
nothing calls this directly
Tested by
no test coverage detected