(...segments: string[])
| 2 | |
| 3 | // Helper to create platform-specific expected paths |
| 4 | const expectedPath = (...segments: string[]) => { |
| 5 | // On Windows, path.normalize converts forward slashes to backslashes |
| 6 | // and paths like /Users become \Users (without a drive letter) |
| 7 | if (process.platform === "win32") { |
| 8 | return "\\" + segments.join("\\") |
| 9 | } |
| 10 | |
| 11 | return "/" + segments.join("/") |
| 12 | } |
| 13 | |
| 14 | describe("normalizePath", () => { |
| 15 | it("should remove trailing slashes", () => { |