mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 12:11:12 +00:00
refactor(cli): privatize internal exports (#106848)
This commit is contained in:
committed by
GitHub
parent
710d1eb443
commit
e69df7ef22
@@ -20,12 +20,10 @@ vi.mock("../../daemon/launchd.js", () => ({
|
||||
}));
|
||||
|
||||
let recoverInstalledLaunchAgent: typeof import("./launchd-recovery.js").recoverInstalledLaunchAgent;
|
||||
let LAUNCH_AGENT_RECOVERY_MESSAGE: typeof import("./launchd-recovery.js").LAUNCH_AGENT_RECOVERY_MESSAGE;
|
||||
|
||||
describe("recoverInstalledLaunchAgent", () => {
|
||||
beforeAll(async () => {
|
||||
({ recoverInstalledLaunchAgent, LAUNCH_AGENT_RECOVERY_MESSAGE } =
|
||||
await import("./launchd-recovery.js"));
|
||||
({ recoverInstalledLaunchAgent } = await import("./launchd-recovery.js"));
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -57,7 +55,7 @@ describe("recoverInstalledLaunchAgent", () => {
|
||||
await expect(recoverInstalledLaunchAgent({ result: "restarted" })).resolves.toEqual({
|
||||
result: "restarted",
|
||||
loaded: true,
|
||||
message: LAUNCH_AGENT_RECOVERY_MESSAGE,
|
||||
message: "Gateway LaunchAgent was installed but not loaded; re-bootstrapped launchd service.",
|
||||
});
|
||||
expect(launchAgentPlistExists).toHaveBeenCalledWith(process.env);
|
||||
expect(repairLaunchAgentBootstrap).toHaveBeenCalledWith({ env: process.env });
|
||||
|
||||
@@ -53,6 +53,3 @@ export async function recoverInstalledLaunchAgent(params: {
|
||||
message: LAUNCH_AGENT_RECOVERY_MESSAGE,
|
||||
};
|
||||
}
|
||||
|
||||
/** User-facing recovery message for successful LaunchAgent bootstrap repair. */
|
||||
export { LAUNCH_AGENT_RECOVERY_MESSAGE };
|
||||
|
||||
Reference in New Issue
Block a user