Fix dev server Ctrl-C shutdown wait

This commit is contained in:
Mohamed Boudra
2026-04-22 12:03:46 +07:00
parent 6503245493
commit 77c8c91ab5
2 changed files with 46 additions and 28 deletions
@@ -14,4 +14,12 @@ describe("supervision parity", () => {
expect(daemonRunnerCalls + devRunnerCalls).toBe(1);
});
test("dev runner waits asynchronously for supervisor shutdown", () => {
const devRunner = readFileSync(new URL("./dev-runner.ts", import.meta.url), "utf8");
expect(devRunner).toContain('import { spawn } from "node:child_process"');
expect(devRunner).not.toContain("spawnSync");
expect(devRunner).toContain('supervisor.on("exit"');
});
});