





















@@ -249,6 +249,14 @@ vi.mock("node:fs/promises", async () => {
249249unlink: vi.fn(async (p: string) => {
250250state.files.delete(p);
251251}),
252+readFile: vi.fn(async (p: string) => {
253+const key = p;
254+const data = state.files.get(key);
255+if (data !== undefined) {
256+return data;
257+}
258+throw new Error(`ENOENT: no such file or directory, read '${key}'`);
259+}),
252260writeFile: vi.fn(async (p: string, data: string, opts?: { mode?: number }) => {
253261const key = p;
254262state.files.set(key, data);
@@ -490,7 +498,6 @@ describe("launchd install", () => {
490498const plistPath = resolveLaunchAgentPlistPath(env);
491499state.serviceLoaded = false;
492500state.kickstartError = "Could not find service";
493-state.kickstartCode = 113;
494501state.kickstartFailuresRemaining = 1;
495502state.files.set(
496503plistPath,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。