diff --git a/DECISIONS.md b/DECISIONS.md index 15148c1..4996260 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -1983,3 +1983,4 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md` - **A job's length depends on the ship**, so the board shows it for the player's fastest crewed ship that could take the job (the permanent checks: hold, range, landing, skills), preferring ships already at the job's origin, since those are the ones that would fly it. Its label says it's game time, and a tooltip says which ship it's for. - **It's the whole trip in game hours** (travel plus loading and takeoff/landing), the figure the Priority window and duty use. +- **Long catch-up and simulation tests get 60 s** (`vi.setConfig` in `balance.test.ts`, `catch-up.test.ts`, `fleet-sleep.test.ts`): with events, a week's replay sometimes passed the 5 s default under coverage on CI. diff --git a/packages/engine/test/catch-up.test.ts b/packages/engine/test/catch-up.test.ts index c58ac04..08ea1e3 100644 --- a/packages/engine/test/catch-up.test.ts +++ b/packages/engine/test/catch-up.test.ts @@ -1,7 +1,7 @@ import { content } from "@deadhead/content"; import type { SaveDocument } from "@deadhead/schema"; import { MS_PER_MINUTE } from "@deadhead/sim"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it, vi } from "vitest"; import { turnaroundMs } from "../src/game/independent"; import { upcomingEvents } from "../src/index"; import { @@ -18,6 +18,9 @@ import { type TestApp, } from "./support"; +// Long catch-ups and simulations: slow under coverage on CI. +vi.setConfig({ testTimeout: 60_000 }); + const HOUR = 60 * MS_PER_MINUTE; const DAY = 24 * HOUR; const FIRST_LOOK = content.config.independentPilots.firstLookRealMinutes * MS_PER_MINUTE; diff --git a/packages/engine/test/fleet-sleep.test.ts b/packages/engine/test/fleet-sleep.test.ts index 53aae27..1397541 100644 --- a/packages/engine/test/fleet-sleep.test.ts +++ b/packages/engine/test/fleet-sleep.test.ts @@ -1,6 +1,6 @@ import { content } from "@deadhead/content"; import type { SaveDocument } from "@deadhead/schema"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it, vi } from "vitest"; import { encodeSave } from "../src/index"; import { addPilot, @@ -15,6 +15,9 @@ import { type TestApp, } from "./support"; +// Long catch-ups and simulations: slow under coverage on CI. +vi.setConfig({ testTimeout: 60_000 }); + const HOUR = 60 * 60_000; describe("fleet sleep in the save (Step 24.1, decisions 0.5.136, 0.5.137)", () => { diff --git a/packages/sim/test/balance.test.ts b/packages/sim/test/balance.test.ts index 357e2bf..3997a4f 100644 --- a/packages/sim/test/balance.test.ts +++ b/packages/sim/test/balance.test.ts @@ -1,8 +1,11 @@ -import { beforeAll, describe, expect, it } from "vitest"; +import { beforeAll, describe, expect, it, vi } from "vitest"; import { simulate, type Milestones, type SimulationResult } from "../balance/simulate"; import { content } from "@deadhead/content"; import { fuelPriceAt, MS_PER_HOUR, tripFuel } from "../src/index"; +// Long catch-ups and simulations: slow under coverage on CI. +vi.setConfig({ testTimeout: 60_000 }); + /** * Balance targets (plan Step 12.1 as amended by CR-001 to CR-013), checked on * the median of several worlds: one world's job luck moves a milestone by tens