Spaces:
Paused
Paused
Download console/src/utils/sessionRoute.test.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 412 Bytes
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/sessionRoute.test.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/utils/sessionRoute.test.ts
-
curl -L -o sessionRoute.test.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/sessionRoute.test.ts
412 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { buildChatPath, getSessionIdFromPath } from "./sessionRoute"; | |
| describe("chat session routes", () => { | |
| it("builds and parses the unified chat route", () => { | |
| const path = buildChatPath("chat-123"); | |
| expect(path).toBe("/chat/chat-123"); | |
| expect(getSessionIdFromPath(path)).toBe("chat-123"); | |
| expect(buildChatPath()).toBe("/chat"); | |
| }); | |
| }); | |