MCPcopy
hub / github.com/claude-code-best/claude-code / makeTestWs

Function makeTestWs

packages/acp-link/src/__tests__/server.test.ts:17–32  ·  view source on GitHub ↗
(sent: unknown[])

Source from the content-addressed store, hash-verified

15import { buildRcsWsUrl } from '../rcs-upstream.js'
16
17function makeTestWs(sent: unknown[]) {
18 type TestWs = Parameters<typeof __testing.dispatchClientMessage>[0]
19
20 return {
21 readyState: 1,
22 send: mock((message: string) => {
23 sent.push(JSON.parse(message))
24 }),
25 close: mock(() => {}),
26 raw: null,
27 isInner: false,
28 url: '',
29 origin: '',
30 protocol: '',
31 } as unknown as TestWs
32}
33
34describe('Server HTTP endpoints', () => {
35 test('package.json has correct bin and main entries', async () => {

Callers 2

server.test.tsFile · 0.85
setupJsonRpcClientFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected