diff --git a/__tests__/utils/sluggify-string.test.js b/__tests__/utils/sluggify-string.test.js new file mode 100644 index 00000000..6c1a7219 --- /dev/null +++ b/__tests__/utils/sluggify-string.test.js @@ -0,0 +1,8 @@ +import sluggifyString from "@/utils/sluggify-string" +import { it, expect } from "vitest" + +it("should keep only lowercase and '-'", () => { + expect(sluggifyString('hél#lö (d)\'wórld "123"_456.xyz')).toBe( + "hello-dworld-xyz" + ) +})