MCPcopy
hub / github.com/buildbot/buildbot / createMockClient

Function createMockClient

www/data-module/src/data/WebSocketClient.test.ts:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12describe('Web socket client', () => {
13 function createMockClient(): [WebSocketClient, MockWebSocket] {
14 const client = new WebSocketClient('url', (_) => new MockWebSocket());
15 const socket = client.socket as MockWebSocket;
16 return [client, socket];
17 }
18
19 function openSocket(socket: MockWebSocket) {
20 if (socket.onopen !== null)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected