(withFix)
| 41 | } |
| 42 | |
| 43 | function runHarness(withFix) { |
| 44 | return new Promise((resolve) => { |
| 45 | const tmpDir = mkdtempSync(join(tmpdir(), "cp-test-")); |
| 46 | const scriptPath = join(tmpDir, "harness.mjs"); |
| 47 | writeFileSync(scriptPath, createTestScript(withFix)); |
| 48 | |
| 49 | const child = spawn("node", [scriptPath], { |
| 50 | stdio: ["pipe", "pipe", "pipe"], |
| 51 | }); |
| 52 | |
| 53 | let stderr = ""; |
| 54 | child.stderr.on("data", (d) => { stderr += d.toString(); }); |
| 55 | |
| 56 | child.on("exit", (code) => { |
| 57 | resolve({ code, stderr }); |
| 58 | }); |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | describe("idle-timeout transport-aware fix", () => { |
| 63 | it("does NOT fire onIdle when isTransportAlive returns true", async () => { |
no test coverage detected