feat: add ZAI auth choice

This commit is contained in:
Peter Steinberger
2026-01-10 16:32:21 +01:00
parent 8b47368167
commit 41c8bdfada
11 changed files with 156 additions and 2 deletions

View File

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