Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2import { buildRuntimeInstructions } from "./RuntimeInstructions.ts";
3
4describe("buildRuntimeInstructions", () => {
5 it("keeps known model and effort metadata on one line", () => {
6 expect(
7 buildRuntimeInstructions({
8 harness: "Codex",
9 model: " custom\nmodel ",
10 reasoningEffort: " high\n",
11 }),
12 ).toContain("through the Codex harness, as custom model with high reasoning effort.");
13 });
14
15 it.each([undefined, "", "auto", "default"])("omits unresolved model %s", (model) => {
16 const instructions = buildRuntimeInstructions({ harness: "Cursor", model });
17 expect(instructions).toContain("through the Cursor harness.");
18 expect(instructions).not.toContain("reasoning effort");
19 });
20});