Files
t3code/apps/server/src/provider/RuntimeInstructions.test.ts
T

21 lines
793 B
TypeScript

import { describe, expect, it } from "vite-plus/test";
import { buildRuntimeInstructions } from "./RuntimeInstructions.ts";
describe("buildRuntimeInstructions", () => {
it("keeps known model and effort metadata on one line", () => {
expect(
buildRuntimeInstructions({
harness: "Codex",
model: " custom\nmodel ",
reasoningEffort: " high\n",
}),
).toContain("through the Codex harness, as custom model with high reasoning effort.");
});
it.each([undefined, "", "auto", "default"])("omits unresolved model %s", (model) => {
const instructions = buildRuntimeInstructions({ harness: "Cursor", model });
expect(instructions).toContain("through the Cursor harness.");
expect(instructions).not.toContain("reasoning effort");
});
});