(ws: WebSocket)
| 89 | } |
| 90 | |
| 91 | async function closeWebSocket(ws: WebSocket): Promise<void> { |
| 92 | if (ws.readyState === WebSocket.CLOSED) { |
| 93 | return; |
| 94 | } |
| 95 | |
| 96 | await new Promise<void>((resolve) => { |
| 97 | ws.once("close", () => resolve()); |
| 98 | ws.close(); |
| 99 | }); |
| 100 | } |
| 101 | |
| 102 | function createHttpClient( |
| 103 | baseUrl: string, |
no test coverage detected