A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io
Rust ai-toolsclaude-codecodexdeepseek-harnessdesktop-appgrokgrokbuildhermeskimi-codemcpopen-sourceopencodepiprovider-managementrustskillsskills-managementtauriwsl-support
import { describe, expect, it } from "vitest";
import { resolveProviderIcon } from "./providerIcon";
describe("resolveProviderIcon", () => {
it("clears the legacy automatic Grok Build icon", () => {
expect(resolveProviderIcon("grokbuild", "grok", "")).toBeUndefined();
expect(resolveProviderIcon("grokbuild", "grok")).toBeUndefined();
});
it("preserves a Grok icon explicitly selected by the user", () => {
expect(resolveProviderIcon("grokbuild", "grok", "currentColor")).toBe(
"grok",
);
});
it("does not reinterpret another app's provider icon", () => {
expect(resolveProviderIcon("codex", "grok", "")).toBe("grok");
});
it("normalizes an empty icon to the initials fallback", () => {
expect(resolveProviderIcon("grokbuild", " ", "")).toBeUndefined();
});
});