mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
15 lines
417 B
TypeScript
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");
|
|
});
|
|
});
|