From 7cd6869cfaf7f4c84995a8b878800ac73eac65aa Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 16 Sep 2026 18:40:10 +0000 Subject: [PATCH] test(ui): match skill source links by exact name so codeql stops flagging the host regexes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../components/claude_code_plugins/skill_detail.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/skill_detail.test.tsx b/ui/litellm-dashboard/src/components/claude_code_plugins/skill_detail.test.tsx index 2f600397a4b..1ec1f72f4a1 100644 --- a/ui/litellm-dashboard/src/components/claude_code_plugins/skill_detail.test.tsx +++ b/ui/litellm-dashboard/src/components/claude_code_plugins/skill_detail.test.tsx @@ -15,7 +15,7 @@ const buildSkill = (source: Plugin["source"]): Plugin => ({ describe("SkillDetail source", () => { it("links a github source to the repository", () => { render(); - expect(screen.getByRole("link", { name: /github.com\/org\/repo/ })).toHaveAttribute( + expect(screen.getByRole("link", { name: "github.com/org/repo" })).toHaveAttribute( "href", "https://github.com/org/repo", ); @@ -26,7 +26,7 @@ describe("SkillDetail source", () => { , ); expect(screen.getByText("git@ghe.example.com:org/repo.git")).toBeInTheDocument(); - expect(screen.queryByRole("link", { name: /ghe.example.com/ })).not.toBeInTheDocument(); + expect(screen.queryByRole("link")).not.toBeInTheDocument(); }); it("renders an ssh git-subdir source as plain text without a tree path", () => { @@ -37,6 +37,6 @@ describe("SkillDetail source", () => { />, ); expect(screen.getByText("git@ghe.example.com:org/repo.git @ plugins/x")).toBeInTheDocument(); - expect(screen.queryByRole("link", { name: /ghe.example.com/ })).not.toBeInTheDocument(); + expect(screen.queryByRole("link")).not.toBeInTheDocument(); }); });