Refine workspaces and event publishing; harden uploads and email delivery
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { slugify } from "./slug";
|
||||
import { eventSlugSchema } from "@album/contracts";
|
||||
|
||||
describe("slugify", () => {
|
||||
test("keeps long generated slugs valid when truncation lands on a hyphen", () => {
|
||||
const slug = slugify(`${"a".repeat(63)} next word`);
|
||||
expect(slug).toBe("a".repeat(63));
|
||||
expect(eventSlugSchema.safeParse(slug).success).toBe(true);
|
||||
});
|
||||
test("lowercases and hyphenates titles", () => {
|
||||
expect(slugify("Summer Block Party")).toBe("summer-block-party");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user