Skip to content

Commit d70261b

Browse files
committed
fix
1 parent 2f8ec3c commit d70261b

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/tempo/client/SessionManager.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,6 @@ describe('Session', () => {
208208
})
209209

210210
describe('.ws()', () => {
211-
function createMockWebSocket() {
212-
const listeners = new Map<string, ((...args: any[]) => void)[]>()
213-
const sent: string[] = []
214-
const ws = {
215-
send: vi.fn((data: string) => sent.push(data)),
216-
close: vi.fn(),
217-
addEventListener: vi.fn((type: string, fn: (...args: any[]) => void, opts?: any) => {
218-
if (!listeners.has(type)) listeners.set(type, [])
219-
listeners.get(type)!.push(fn)
220-
if (type === 'open') setTimeout(() => fn(), 0)
221-
}),
222-
removeEventListener: vi.fn(),
223-
}
224-
return { ws, sent, listeners, dispatch: (type: string, data: any) => {
225-
for (const fn of listeners.get(type) ?? []) fn(data)
226-
}}
227-
}
228-
229211
test('throws when no challenge received from HTTP endpoint', async () => {
230212
const mockFetch = vi.fn().mockResolvedValue(makeOkResponse())
231213

0 commit comments

Comments
 (0)