From 33d5ebbff7bceb782b314de14ebd9a213ba31869 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 25 Apr 2026 07:11:29 +0100 Subject: [PATCH] test(daemon): read launchd fixture files --- src/daemon/launchd.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/daemon/launchd.test.ts b/src/daemon/launchd.test.ts index 18db288d93c..84f931adc9a 100644 --- a/src/daemon/launchd.test.ts +++ b/src/daemon/launchd.test.ts @@ -249,6 +249,14 @@ vi.mock("node:fs/promises", async () => { unlink: vi.fn(async (p: string) => { state.files.delete(p); }), + readFile: vi.fn(async (p: string) => { + const key = p; + const data = state.files.get(key); + if (data !== undefined) { + return data; + } + throw new Error(`ENOENT: no such file or directory, read '${key}'`); + }), writeFile: vi.fn(async (p: string, data: string, opts?: { mode?: number }) => { const key = p; state.files.set(key, data); @@ -490,7 +498,6 @@ describe("launchd install", () => { const plistPath = resolveLaunchAgentPlistPath(env); state.serviceLoaded = false; state.kickstartError = "Could not find service"; - state.kickstartCode = 113; state.kickstartFailuresRemaining = 1; state.files.set( plistPath,