|
|
@@ -119,14 +119,14 @@ describe("cleanupOrphanedVectors", () => {
|
|
|
// =============================================================================
|
|
|
|
|
|
describe("handelize", () => {
|
|
|
- test("converts to lowercase", () => {
|
|
|
- expect(handelize("README.md")).toBe("readme.md");
|
|
|
- expect(handelize("MyFile.MD")).toBe("myfile.md");
|
|
|
+ test("preserves original case", () => {
|
|
|
+ expect(handelize("README.md")).toBe("README.md");
|
|
|
+ expect(handelize("MyFile.MD")).toBe("MyFile.MD");
|
|
|
});
|
|
|
|
|
|
test("preserves folder structure", () => {
|
|
|
expect(handelize("a/b/c/d.md")).toBe("a/b/c/d.md");
|
|
|
- expect(handelize("docs/api/README.md")).toBe("docs/api/readme.md");
|
|
|
+ expect(handelize("docs/api/README.md")).toBe("docs/api/README.md");
|
|
|
});
|
|
|
|
|
|
test("replaces non-word characters with dash", () => {
|
|
|
@@ -156,7 +156,7 @@ describe("handelize", () => {
|
|
|
test("handles complex real-world meeting notes", () => {
|
|
|
const complexName = "Money Movement Licensing Review - 2025/11/19 10:25 EST - Notes by Gemini.md";
|
|
|
const result = handelize(complexName);
|
|
|
- expect(result).toBe("money-movement-licensing-review-2025-11-19-10-25-est-notes-by-gemini.md");
|
|
|
+ expect(result).toBe("Money-Movement-Licensing-Review-2025-11-19-10-25-EST-Notes-by-Gemini.md");
|
|
|
expect(result).not.toContain(" ");
|
|
|
expect(result).not.toContain("/");
|
|
|
expect(result).not.toContain(":");
|
|
|
@@ -164,7 +164,7 @@ describe("handelize", () => {
|
|
|
|
|
|
test("handles unicode characters", () => {
|
|
|
expect(handelize("日本語.md")).toBe("日本語.md");
|
|
|
- expect(handelize("Зоны и проекты.md")).toBe("зоны-и-проекты.md");
|
|
|
+ expect(handelize("Зоны и проекты.md")).toBe("Зоны-и-проекты.md");
|
|
|
expect(handelize("café-notes.md")).toBe("café-notes.md");
|
|
|
expect(handelize("naïve.md")).toBe("naïve.md");
|
|
|
expect(handelize("日本語-notes.md")).toBe("日本語-notes.md");
|
|
|
@@ -186,13 +186,13 @@ describe("handelize", () => {
|
|
|
test("handles dates and times in filenames", () => {
|
|
|
expect(handelize("meeting-2025-01-15.md")).toBe("meeting-2025-01-15.md");
|
|
|
expect(handelize("notes 2025/01/15.md")).toBe("notes-2025/01/15.md");
|
|
|
- expect(handelize("call_10:30_AM.md")).toBe("call-10-30-am.md");
|
|
|
+ expect(handelize("call_10:30_AM.md")).toBe("call-10-30-AM.md");
|
|
|
});
|
|
|
|
|
|
test("handles special project naming patterns", () => {
|
|
|
- expect(handelize("PROJECT_ABC_v2.0.md")).toBe("project-abc-v2-0.md");
|
|
|
- expect(handelize("[WIP] Feature Request.md")).toBe("wip-feature-request.md");
|
|
|
- expect(handelize("(DRAFT) Proposal v1.md")).toBe("draft-proposal-v1.md");
|
|
|
+ expect(handelize("PROJECT_ABC_v2.0.md")).toBe("PROJECT-ABC-v2-0.md");
|
|
|
+ expect(handelize("[WIP] Feature Request.md")).toBe("WIP-Feature-Request.md");
|
|
|
+ expect(handelize("(DRAFT) Proposal v1.md")).toBe("DRAFT-Proposal-v1.md");
|
|
|
});
|
|
|
|
|
|
test("handles symbol-only route filenames", () => {
|