MCPcopy
hub / github.com/audreyt/ethercalc / factory

Function factory

packages/client/test/ws-adapter.test.ts:190–198  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

188 let first = true;
189 const sockets: MockWebSocket[] = [];
190 const factory = (url: string) => {
191 if (first) {
192 first = false;
193 throw new Error('boom');
194 }
195 const s = new MockWebSocket(url);
196 sockets.push(s);
197 return s;
198 };
199 const timers = createFakeTimers();
200 const adapter = createWsAdapter({
201 room: 'r',

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected