MCPcopy Create free account
hub / github.com/Noumena-Network/code / expectInitialize

Function expectInitialize

src/remote/appServer/client.test.ts:88–108  ·  view source on GitHub ↗
(peer: FakePeer)

Source from the content-addressed store, hash-verified

86}
87
88async function expectInitialize(peer: FakePeer): Promise<void> {
89 const initialize = (await peer.next('initialize')) as {
90 method?: string
91 id?: unknown
92 params?: { clientInfo?: { name?: string; version?: string } }
93 }
94 expect(initialize.method).toBe('initialize')
95 expect(initialize.id).toBe('initialize')
96 expect(initialize.params?.clientInfo?.name).toBe('ncode-test')
97 peer.send({
98 id: initialize.id,
99 result: {
100 userAgent: 'codex-test',
101 codexHome: '/tmp/codex',
102 platformFamily: 'unix',
103 platformOs: 'linux',
104 },
105 })
106 const initialized = (await peer.next('initialized')) as { method?: string }
107 expect(initialized.method).toBe('initialized')
108}
109
110function testConnectArgs(url: string) {
111 return {

Callers 1

client.test.tsFile · 0.85

Calls 2

nextMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected