From 005a5a82a7492e00dafa0faab74557ea3cb0c92e Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Tue, 31 Mar 2026 15:53:43 -0700 Subject: [PATCH] Fix noisy and broken tests. --- app/services/simulations/__tests__/darts-simulator.test.ts | 2 +- .../simulations/__tests__/world-cup-simulator.test.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/simulations/__tests__/darts-simulator.test.ts b/app/services/simulations/__tests__/darts-simulator.test.ts index 804ba8e..1df59e7 100644 --- a/app/services/simulations/__tests__/darts-simulator.test.ts +++ b/app/services/simulations/__tests__/darts-simulator.test.ts @@ -368,7 +368,7 @@ describe("DartsSimulator.simulate() — Path B (pre-bracket)", () => { function makeEVRowsWithRankings() { return SEASON_PARTICIPANTS.map((p, i) => ({ participantId: p.id, - sourceElo: ELO_BASE - i * 2, // higher seed = higher Elo + sourceElo: ELO_BASE - i * 100, // higher seed = higher Elo; large gap needed for reliable MC ordering worldRanking: i + 1, })); } diff --git a/app/services/simulations/__tests__/world-cup-simulator.test.ts b/app/services/simulations/__tests__/world-cup-simulator.test.ts index 66991d6..6fc3602 100644 --- a/app/services/simulations/__tests__/world-cup-simulator.test.ts +++ b/app/services/simulations/__tests__/world-cup-simulator.test.ts @@ -1,6 +1,10 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; import { simGroupMatch, WorldCupSimulator } from "../world-cup-simulator"; +vi.mock("~/lib/logger", () => ({ + logger: { warn: vi.fn(), info: vi.fn(), error: vi.fn(), debug: vi.fn() }, +})); + // ─── Pure math: simGroupMatch ───────────────────────────────────────────────── describe("simGroupMatch", () => {