Files
paseo/packages/app/src/utils/open-external-url.test.ts
T
Mohamed Boudra c7db3c5a8c Let plugins open external links and workspace browsers (#4972)
* feat(plugins): open external links and workspace browsers

* fix(plugins): refuse invalid links and unavailable browser workspaces

* docs(plugins): clarify external links and browser navigation
2026-09-16 23:25:17 +02:00

12 lines
390 B
TypeScript

import { describe, expect, it } from "vitest";
import { openExternalUrl } from "./open-external-url";
describe("external URL refusal", () => {
it.each(["mailto:person@example.com", "javascript:alert(1)", "/relative", "invalid"])(
"safely ignores %s for fire-and-forget callers",
async (url) => {
await expect(openExternalUrl(url)).resolves.toBeUndefined();
},
);
});