Skip to content

fix: include origin in support link #16572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed Feb 14, 2025
commit 5dd40b7e8e71f21fd8d4ed17d69393cda13d5933
4 changes: 1 addition & 3 deletions site/src/modules/dashboard/Navbar/MobileMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ describe("support link", () => {
it("should include origin if target starts with '/'", () => {
const mockOrigin = "https://example.com";

// eslint-disable-next-line window object
delete (window as any).location; // Remove the existing location object
// eslint-disable-next-line window object
// eslint-disable-next-line
(window as any).location = { origin: mockOrigin }; // Mock the location origin

expect(includeOrigin("/test")).toBe("https://example.com/test");
Expand Down
Loading