fix: polish opencode-zen onboarding (#623) (thanks @magimetal)

This commit is contained in:
Peter Steinberger
2026-01-10 01:07:56 +01:00
parent 05bd100f7a
commit c69c4caa33
9 changed files with 166 additions and 5 deletions

View File

@@ -133,6 +133,29 @@ describe("cli program", () => {
expect(setupCommand).not.toHaveBeenCalled();
});
it("passes opencode-zen api key to onboard", async () => {
const program = buildProgram();
await program.parseAsync(
[
"onboard",
"--non-interactive",
"--auth-choice",
"opencode-zen",
"--opencode-zen-api-key",
"sk-opencode-zen-test",
],
{ from: "user" },
);
expect(onboardCommand).toHaveBeenCalledWith(
expect.objectContaining({
nonInteractive: true,
authChoice: "opencode-zen",
opencodeZenApiKey: "sk-opencode-zen-test",
}),
runtime,
);
});
it("runs providers login", async () => {
const program = buildProgram();
await program.parseAsync(["providers", "login", "--account", "work"], {