Download core/tests/node/path.test.ts from oldg591/jannn: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/spaces/oldg591/jannn/resolve/main/core/tests/node/path.test.ts
- Command line
-
hf download hf://spaces/oldg591/jannn/core/tests/node/path.test.ts
-
curl -L -o path.test.ts https://huggingface.co/spaces/oldg591/jannn/resolve/main/core/tests/node/path.test.ts
521 Bytes
| import { normalizeFilePath } from "../../src/node/helper/path"; | |
| describe("Test file normalize", () => { | |
| test("returns no file protocol prefix on Unix", async () => { | |
| expect(normalizeFilePath("file://test.txt")).toBe("test.txt"); | |
| expect(normalizeFilePath("file:/test.txt")).toBe("test.txt"); | |
| }); | |
| test("returns no file protocol prefix on Windows", async () => { | |
| expect(normalizeFilePath("file:\\\\test.txt")).toBe("test.txt"); | |
| expect(normalizeFilePath("file:\\test.txt")).toBe("test.txt"); | |
| }); | |
| }); | |