test: tighten provider choice assertions

This commit is contained in:
Shakker
2026-05-08 15:48:27 +01:00
parent a0459cde8a
commit 5871350356
2 changed files with 12 additions and 9 deletions
+8 -6
View File
@@ -20,17 +20,19 @@ describe("arcee provider plugin", () => {
providers: [provider],
choice: "arceeai-api-key",
});
expect(directChoice).not.toBeNull();
expect(directChoice?.provider.id).toBe("arcee");
expect(directChoice?.method.id).toBe("arcee-platform");
expect(directChoice).toMatchObject({
provider: { id: "arcee" },
method: { id: "arcee-platform" },
});
const orChoice = resolveProviderPluginChoice({
providers: [provider],
choice: "arceeai-openrouter",
});
expect(orChoice).not.toBeNull();
expect(orChoice?.provider.id).toBe("arcee");
expect(orChoice?.method.id).toBe("openrouter");
expect(orChoice).toMatchObject({
provider: { id: "arcee" },
method: { id: "openrouter" },
});
});
it("stores the OpenRouter onboarding path under the OpenRouter auth profile", async () => {
+4 -3
View File
@@ -141,9 +141,10 @@ describe("deepseek provider plugin", () => {
expect(provider.label).toBe("DeepSeek");
expect(provider.envVars).toEqual(["DEEPSEEK_API_KEY"]);
expect(provider.auth).toHaveLength(1);
expect(resolved).not.toBeNull();
expect(resolved?.provider.id).toBe("deepseek");
expect(resolved?.method.id).toBe("api-key");
expect(resolved).toMatchObject({
provider: { id: "deepseek" },
method: { id: "api-key" },
});
});
it("builds the static DeepSeek model catalog", async () => {