File size: 412 Bytes
4e7644b
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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");
  });
});