fix(setup): persist detected Hopper launcher
This commit is contained in:
@@ -22,6 +22,7 @@ class FakeSetupHost implements SetupHost {
|
||||
homebrewInstalls = 0;
|
||||
hopperInstalls = 0;
|
||||
configurations = 0;
|
||||
configuredHopperPaths: string[] = [];
|
||||
|
||||
macosVersion = (): Promise<string | undefined> =>
|
||||
Promise.resolve(this.version);
|
||||
@@ -41,8 +42,10 @@ class FakeSetupHost implements SetupHost {
|
||||
Promise.resolve(this.clients);
|
||||
configureClient = (
|
||||
client: SetupClient,
|
||||
hopperPath: string,
|
||||
): Promise<ClientConfigurationResult> => {
|
||||
this.configurations += 1;
|
||||
this.configuredHopperPaths.push(hopperPath);
|
||||
return Promise.resolve(
|
||||
this.clientResults.get(client.name) ?? {
|
||||
status: "configured",
|
||||
@@ -99,6 +102,7 @@ describe("setup workflow", () => {
|
||||
host.hopper = "/Applications/Manual Hopper";
|
||||
expect((await runSetup(true, host)).actions).toEqual(["installed_skill"]);
|
||||
expect(host.hopperInstalls).toBe(0);
|
||||
expect(host.configuredHopperPaths).toEqual([]);
|
||||
});
|
||||
|
||||
it.each(["homebrew", "hopper"] as const)(
|
||||
@@ -127,6 +131,7 @@ describe("setup workflow", () => {
|
||||
const result = await runSetup(true, host);
|
||||
expect(Object.keys(result.clients)).toEqual(["claude", "cursor"]);
|
||||
expect(host.configurations).toBe(2);
|
||||
expect(host.configuredHopperPaths).toEqual(["/Hopper", "/Hopper"]);
|
||||
});
|
||||
|
||||
it.each(["backup", "write", "readback"] as const)(
|
||||
|
||||
Reference in New Issue
Block a user