fix: add comment explaining process.exit mock pattern per review

This commit is contained in:
2026-04-27 14:56:26 +08:00
parent a54cc703c9
commit c3a03b280d
@@ -82,6 +82,8 @@ describe("nerve sense trigger (e2e mock daemon)", () => {
vi.spyOn(process, "exit").mockImplementation((code?: number | string | null) => {
const c = typeof code === "number" ? code : 1;
// Throw instead of actually exiting so the test runner stays alive;
// the test asserts on this message to verify the exit code.
throw new Error(`process.exit(${String(c)})`);
});
});