sendou.ink/app/utils/string.test.ts
Kalle 32c97a2467
Bluesky via Discord connection + upgrade remix-auth + remove Twitter references (#2058)
* Remove Twitter references

* Upgrade remix auth, bsky via Discord

* Test
2025-01-28 17:22:45 +02:00

15 lines
417 B
TypeScript

import { describe, expect, test } from "vitest";
import { pathnameFromPotentialURL } from "./strings";
describe("pathnameFromPotentialURL()", () => {
test("Resolves path name from valid URL", () => {
expect(pathnameFromPotentialURL("https://bsky.app/sendouc")).toBe(
"sendouc",
);
});
test("Returns string as is if not URL", () => {
expect(pathnameFromPotentialURL("sendouc")).toBe("sendouc");
});
});