9b30f681c6
- React+antd+zustand,注册表驱动路由/菜单/权限 - Tauri 桌面壳、后端托管 SPA、跨标签页消息队列
15 lines
498 B
TypeScript
15 lines
498 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { buildSessionPath, getSessionIdFromPath } from "./sessionRoute";
|
|
|
|
describe("session mode routes", () => {
|
|
it("preserves the session id across coding and chat routes", () => {
|
|
const sessionId = getSessionIdFromPath("/coding/chat-123");
|
|
|
|
expect(buildSessionPath("chat", sessionId)).toBe("/chat/chat-123");
|
|
expect(
|
|
buildSessionPath("coding", getSessionIdFromPath("/chat/chat-123")),
|
|
).toBe("/coding/chat-123");
|
|
});
|
|
});
|