From 5446913ef8bd107c3457093dbc091fedd2436bfe Mon Sep 17 00:00:00 2001 From: Marcelo Ceccon <32395187+marceloceccon@users.noreply.github.com> Date: Fri, 20 Nov 2026 23:18:28 +0000 Subject: [PATCH] test: give the Compare attempts run-blocker fixture full ModelInfo objects tsc --noEmit reported 8 errors in tests/compare-store-and-blocker.test.ts (participants and availableModels used partial ModelInfo). CI does not type-check test files (vitest does not, and next build skips them), so it slipped through #19. Type-only fix; assertions unchanged. --- tests/compare-store-and-blocker.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/compare-store-and-blocker.test.ts b/tests/compare-store-and-blocker.test.ts index 6cbc06b..8ca414e 100644 --- a/tests/compare-store-and-blocker.test.ts +++ b/tests/compare-store-and-blocker.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach } from "vitest"; import { useArenaStore } from "@/lib/store"; import { getRunBlocker } from "@/lib/run-blocker"; -import type { CompareResult } from "@/lib/types"; +import type { CompareResult, ModelInfo } from "@/lib/types"; // Contracts: the attempts editor actions keep 2–6 attempts and ≤8 checks; // applyCompareEvent folds the SSE stream into `compare`; the run blocker @@ -103,10 +103,11 @@ describe("applyCompareEvent", () => { }); describe("getRunBlocker — Compare attempts", () => { + const model: ModelInfo = { id: "t:m", providerId: "t", providerName: "T", modelId: "m" }; const base = { prompt: "Fix it", - participants: [{ modelInfo: { id: "t:m" } }, { modelInfo: { id: "t:m" } }], - availableModels: [{ id: "t:m" }], + participants: [{ modelInfo: model }, { modelInfo: model }], + availableModels: [model], modelsLoading: false, options: { engine: "compare-attempts" as const, judgeEnabled: false }, };