mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-07 08:54:42 +00:00
* 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
12 lines
390 B
TypeScript
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();
|
|
},
|
|
);
|
|
});
|