test: tighten zai onboard assertions

This commit is contained in:
Shakker
2026-05-11 10:12:37 +01:00
parent 4452df5b17
commit c95bbca8f1

View File

@@ -7,10 +7,8 @@ import { applyZaiConfig, applyZaiProviderConfig } from "./onboard.js";
describe("zai onboard", () => {
it("adds zai provider with correct settings", () => {
const cfg = applyZaiConfig({});
expect(cfg.models?.providers?.zai).toMatchObject({
baseUrl: ZAI_GLOBAL_BASE_URL,
api: "openai-completions",
});
expect(cfg.models?.providers?.zai?.baseUrl).toBe(ZAI_GLOBAL_BASE_URL);
expect(cfg.models?.providers?.zai?.api).toBe("openai-completions");
const ids = cfg.models?.providers?.zai?.models?.map((m) => m.id);
expect(ids).toContain("glm-5");
expect(ids).toContain("glm-5-turbo");