import slugify from "../utils/slugify"; describe("slugify", () => { it("create slugs", () => { const slug = slugify("Testing How Slugs / Other Things, Work"); expect(slug).toBe("testing-how-slugs-other-things-work"); }); it("supports different delimiters", () => { const slug = slugify(" Test Slug ", { delimiter: "_" }); expect(slug).toBe("test_slug"); }); it("allows forward slashes", () => { const slug = slugify("my/content/path", { allowUrlPath: true }); expect(slug).toBe("my/content/path"); }); });