Files
agentic-labs-challenge-subm…/adaptive-loop/test/solver.test.ts
T
2026-08-15 19:22:22 +02:00

15 lines
661 B
TypeScript

import { describe, expect, it } from "vitest";
import { buildInitialState, getScenario } from "../src/domain/scenarios.ts";
import { hashState, reachableInheritanceAt } from "../src/domain/solver.ts";
describe("solver support", () => {
it("hashes identical canonical states identically", () => {
const scenario = getScenario("s1-heat");
expect(hashState(buildInitialState(scenario, "campaign"))).toBe(hashState(buildInitialState(scenario, "campaign")));
});
it("enumerates the complete conservative inheritance superset", () => {
expect([2, 3, 4, 5].map((index) => reachableInheritanceAt(index).length)).toEqual([9, 37, 93, 163]);
});
});