The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
import { describe, it, expect } from "vitest";
import {
EFFORT_OPTIONS,
VALID_EFFORTS,
normalizeEffort,
} from "./reasoning-effort";
describe("normalizeEffort", () => {
it("treats empty/unset as the Hermes default (medium)", () => {
expect(normalizeEffort("")).toBe("medium");
expect(normalizeEffort(null)).toBe("medium");
expect(normalizeEffort(undefined)).toBe("medium");
expect(normalizeEffort(" ")).toBe("medium");
});
it("passes through every valid effort level", () => {
for (const level of VALID_EFFORTS) {
expect(normalizeEffort(level)).toBe(level);
}
});
it("is case- and whitespace-insensitive", () => {
expect(normalizeEffort("HIGH")).toBe("high");
expect(normalizeEffort(" XHigh ")).toBe("xhigh");
});
it("falls back to medium for unknown values", () => {
expect(normalizeEffort("turbo")).toBe("medium");
expect(normalizeEffort(42)).toBe("medium");
});
});
describe("EFFORT_OPTIONS", () => {
it("every option value is in VALID_EFFORTS (no orphan labels)", () => {
for (const opt of EFFORT_OPTIONS) {
expect(VALID_EFFORTS.has(opt.value)).toBe(true);
}
});
});