feat: mock Homarr Assistant in demo mode and fix board page crash (#6524)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-14 11:32:10 +02:00
1 parent f991dc6334
commit 7bf22639ba
6 files changed
+127 -43

No files matched your search

@@ -0,0 +1,18 @@
import { describe, expect, test } from "vitest";
import { toProviderOptionsKey } from "./assistant-provider-options";
describe("toProviderOptionsKey", () => {
test("converts the hyphenated provider name to the camelCase AI SDK provider option key", () => {
expect(toProviderOptionsKey("homarr-openrouter")).toBe("homarrOpenrouter");
});
test("matches the @ai-sdk/openai-compatible camelCase conversion", () => {
expect(toProviderOptionsKey("homarr-anthropic")).toBe("homarrAnthropic");
expect(toProviderOptionsKey("homarr-google-gemini")).toBe("homarrGoogleGemini");
});
test("leaves names without separators unchanged", () => {
expect(toProviderOptionsKey("homarr")).toBe("homarr");
});
});