Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2
3import { modelLabelBesideIcon } from "./modelLabel";
4
5describe("modelLabelBesideIcon", () => {
6 it("drops brand words the provider icon already shows", () => {
7 expect(modelLabelBesideIcon("Claude Opus 5.5")).toBe("Opus 5.5");
8 expect(modelLabelBesideIcon("Google Gemini 3 Pro")).toBe("Gemini 3 Pro");
9 expect(modelLabelBesideIcon("Anthropic Claude Sonnet 5.5")).toBe("Sonnet 5.5");
10 });
11
12 it("keeps labels that start with the model family", () => {
13 expect(modelLabelBesideIcon("GPT-6.1-Sol")).toBe("GPT-6.1-Sol");
14 expect(modelLabelBesideIcon("Qwen3 Coder 480B A35B Instruct")).toBe(
15 "Qwen3 Coder 480B A35B Instruct",
16 );
17 expect(modelLabelBesideIcon("gpt-5.4")).toBe("gpt-5.4");
18 });
19
20 it("never empties a label that is only a brand", () => {
21 expect(modelLabelBesideIcon("Claude")).toBe("Claude");
22 expect(modelLabelBesideIcon("Claude ")).toBe("Claude");
23 });
24});