fix(server): preserve dev runner signal handling

This commit is contained in:
Mohamed Boudra
2026-04-22 17:51:37 +07:00
parent a582fccef0
commit 274a7fd217
2 changed files with 12 additions and 1 deletions

View File

@@ -22,4 +22,15 @@ describe("supervision parity", () => {
expect(devRunner).not.toContain("spawnSync");
expect(devRunner).toContain('supervisor.on("exit"');
});
test("npm dev script runs dev-runner as the signal-handling node process", () => {
const packageJson = JSON.parse(
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
) as { scripts?: Record<string, string> };
const devScript = packageJson.scripts?.dev ?? "";
expect(devScript).toContain("node --import tsx scripts/dev-runner.ts");
expect(devScript).not.toMatch(/^cross-env NODE_ENV=development tsx scripts\/dev-runner\.ts$/);
});
});