From 467a4a5eed76ee047991b7a9a509cf06d2b1e0df Mon Sep 17 00:00:00 2001 From: Samuele Domenico Ruffino Date: Thu, 23 Apr 2026 15:30:04 +0200 Subject: [PATCH] fix(test): use toContain instead of providers[0].toBe for multi-provider entries Restore consistent assertion style in librarian and explore tests. Multi-provider entries like ["opencode-go", "vercel"] should use toContain() not providers[0].toBe() to match the established pattern. --- src/shared/model-requirements.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/model-requirements.test.ts b/src/shared/model-requirements.test.ts index 33d53fea1..b6e753f91 100644 --- a/src/shared/model-requirements.test.ts +++ b/src/shared/model-requirements.test.ts @@ -79,7 +79,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.model).toBe("gpt-5.4-mini-fast") const second = librarian.fallbackChain[1] - expect(second.providers[0]).toBe("opencode-go") + expect(second.providers).toContain("opencode-go") expect(second.model).toBe("qwen3.5-plus") const third = librarian.fallbackChain[2] @@ -87,7 +87,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(third.model).toBe("minimax-m2.7-highspeed") const quaternary = librarian.fallbackChain[3] - expect(quaternary.providers[0]).toBe("opencode-go") + expect(quaternary.providers).toContain("opencode-go") expect(quaternary.model).toBe("minimax-m2.7") const quinary = librarian.fallbackChain[4] @@ -113,7 +113,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.model).toBe("gpt-5.4-mini-fast") const secondary = explore.fallbackChain[1] - expect(secondary.providers[0]).toBe("opencode-go") + expect(secondary.providers).toContain("opencode-go") expect(secondary.model).toBe("qwen3.5-plus") const third = explore.fallbackChain[2] @@ -121,7 +121,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(third.model).toBe("minimax-m2.7-highspeed") const quaternary = explore.fallbackChain[3] - expect(quaternary.providers[0]).toBe("opencode-go") + expect(quaternary.providers).toContain("opencode-go") expect(quaternary.model).toBe("minimax-m2.7") const quinary = explore.fallbackChain[4]