()
| 28 | `; |
| 29 | |
| 30 | const freePort = (): Promise<number> => |
| 31 | new Promise((resolve, reject) => { |
| 32 | const srv = net.createServer(); |
| 33 | srv.on("error", reject); |
| 34 | srv.listen(0, "127.0.0.1", () => { |
| 35 | const port = (srv.address() as net.AddressInfo).port; |
| 36 | srv.close(() => resolve(port)); |
| 37 | }); |
| 38 | }); |
| 39 | |
| 40 | const readToken = async (dataDir: string): Promise<string> => { |
| 41 | const path = join(dataDir, "server-control", "auth.json"); |
no test coverage detected