A socket path (a named pipe on Windows) no other test uses.
()
| 37 | |
| 38 | /** A socket path (a named pipe on Windows) no other test uses. */ |
| 39 | function uniqueSocketPath(): string { |
| 40 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-proxy-')); |
| 41 | cleanups.push(() => { try { fs.rmSync(dir, { recursive: true, force: true }); } catch { /* ignore */ } }); |
| 42 | return process.platform === 'win32' ? `\\\\.\\pipe\\${path.basename(dir)}-d` : path.join(dir, 'd.sock'); |
| 43 | } |
| 44 | |
| 45 | /** Stand up a fake daemon on its own path: a valid hello as `version`, and the proof `proof` says. */ |
| 46 | async function fakeDaemon(version: string, proof: FakeProof = 'valid') { |
no test coverage detected