You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
528 B
14 lines
528 B
import { describe, expect, test } from "bun:test";
|
|
import { buildPublicProfileAbsoluteUrl } from "./public-profile-url";
|
|
|
|
describe("buildPublicProfileAbsoluteUrl", () => {
|
|
test("joins origin with /@slug path", () => {
|
|
expect(buildPublicProfileAbsoluteUrl("https://example.com", "my-slug")).toBe(
|
|
"https://example.com/@my-slug",
|
|
);
|
|
});
|
|
|
|
test("normalizes origin without trailing slash", () => {
|
|
expect(buildPublicProfileAbsoluteUrl("https://example.com/", "ab")).toBe("https://example.com/@ab");
|
|
});
|
|
});
|
|
|