fixes #2082, fixes #2066 - fallback to cuid2 if filename contains non-latin characters

This commit is contained in:
Amruth Pillai
2025-01-12 18:06:44 +01:00
parent 2d62504895
commit 6335ad1571
11 changed files with 54 additions and 36 deletions

View File

@ -6,7 +6,6 @@ import {
getInitials,
isEmptyString,
isUrl,
kebabCase,
processUsername,
} from "../string";
@ -40,16 +39,6 @@ describe("extractUrl", () => {
});
});
describe("kebabCase", () => {
it("converts a string to kebab-case", () => {
expect(kebabCase("fooBar")).toBe("foo-bar");
expect(kebabCase("Foo Bar")).toBe("foo-bar");
expect(kebabCase("foo_bar")).toBe("foo-bar");
expect(kebabCase("")).toBe("");
expect(kebabCase(null)).toBe("");
});
});
describe("generateRandomName", () => {
it("generates a random name", () => {
const name = generateRandomName();