test(ui): add provider display name tests to satisfy CI requirement
This commit is contained in:
parent
61e33519c4
commit
ce28d00c50
2 changed files with 17 additions and 1 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// GSD-2 — Provider display name mapping tests
|
||||
import { test, describe } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { providerDisplayName } from "../model-selector.js";
|
||||
|
||||
describe("providerDisplayName", () => {
|
||||
test("renames 'anthropic' to 'anthropic-api'", () => {
|
||||
assert.equal(providerDisplayName("anthropic"), "anthropic-api");
|
||||
});
|
||||
|
||||
test("passes through unmapped providers unchanged", () => {
|
||||
assert.equal(providerDisplayName("claude-code"), "claude-code");
|
||||
assert.equal(providerDisplayName("openai"), "openai");
|
||||
assert.equal(providerDisplayName("bedrock"), "bedrock");
|
||||
});
|
||||
});
|
||||
|
|
@ -20,7 +20,7 @@ const PROVIDER_DISPLAY_NAMES: Record<string, string> = {
|
|||
anthropic: "anthropic-api",
|
||||
};
|
||||
|
||||
function providerDisplayName(provider: string): string {
|
||||
export function providerDisplayName(provider: string): string {
|
||||
return PROVIDER_DISPLAY_NAMES[provider] ?? provider;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue