import { test } from "node:test"; import assert from "node:assert/strict"; import { policyChipLabel } from "./policyChip"; const models = { api: "claude-sonnet-5-5", local: "qwen2.5:7b" }; test("without local only the chip is what it always was: the API model and the day's spend, whatever the preset", () => { for (const preset of ["balanced", "local", "code", "api"]) { assert.deepEqual(policyChipLabel({ preset, models }, false), { preset, model: "sonnet-5-5", spend: true, localOnly: false }); } }); test("on a local-only editor: the local model, no spend, and the flag", () => { assert.deepEqual(policyChipLabel({ preset: "local", models }, true), { preset: "local", model: "qwen2.5:7b", spend: false, localOnly: true }); });