feat(cli): improve setup onboarding

This commit is contained in:
morluto
2026-07-18 11:59:16 +08:00
parent 7bccb7c6ae
commit 16002ff3c2
70 changed files with 2043 additions and 228 deletions
+13
View File
@@ -4,6 +4,7 @@ import { describe, expect, it } from "vitest";
import {
installMacHopper,
macHopperInstallDisclosure,
type MacHopperInstallHost,
} from "../src/application/MacHopper.js";
@@ -74,6 +75,18 @@ class FakeMacHopperHost implements MacHopperInstallHost {
}
describe("macOS Hopper installation", () => {
it("discloses network and command boundaries before installation", () => {
expect(macHopperInstallDisclosure).toMatchObject({
networkOrigins: [
"https://www.hopperapp.com/include/files-api.php?request=releases&public=true",
"https://www.hopperapp.com:443/downloader/public/",
],
});
expect(macHopperInstallDisclosure.commands).toContain(
"hdiutil attach -readonly -nobrowse -mountpoint <private-mount> <verified-hopper.dmg>",
);
});
it("installs, verifies, opens, and cleans the official package", async () => {
const host = new FakeMacHopperHost();
await expect(installMacHopper({}, host)).resolves.toEqual({