🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: Add client test for sidebar notification badge URL (#12411)
Max Deichmann8fd1da4f22a9
diff --git a/web/src/components/nav/sidebar-notifications.clienttest.tsx b/web/src/components/nav/sidebar-notifications.clienttest.tsxnew file mode 100644index 0000000000..01325f994f--- /dev/null+++ b/web/src/components/nav/sidebar-notifications.clienttest.tsx@@ -0,0 +1,19 @@+import { render, screen } from "@testing-library/react";+import { SidebarNotifications } from "./sidebar-notifications";++jest.mock("../useLocalStorage", () => ({+ __esModule: true,+ default: () => [[], jest.fn()],+}));++describe("SidebarNotifications", () => {+ it("renders the GitHub stars badge with social style query params", () => {+ render(<SidebarNotifications />);++ const badge = screen.getByAltText("Langfuse GitHub stars");+ const src = badge.getAttribute("src");++ expect(src).toContain("style=social");+ expect(src).not.toContain("&");+ });+});diff --git a/web/src/components/nav/sidebar-notifications.tsx b/web/src/components/nav/sidebar-notifications.tsxindex 0fe69d9c5f..b82e460748 100644--- a/web/src/components/nav/sidebar-notifications.tsx+++ b/web/src/components/nav/sidebar-notifications.tsx@@ -37,7 +37,7 @@ const notifications: SidebarNotification[] = [// eslint-disable-next-line @next/next/no-img-element<imgalt="Langfuse GitHub stars"- src="https://img.shields.io/github/stars/langfuse/langfuse?label=langfuse&style=social"+ src="https://img.shields.io/github/stars/langfuse/langfuse?label=langfuse&style=social"/>),},