gaza/src/sessionPresentation.test.ts
Ubuntu 7d0805667c 统一 Session 协议模型与表格展示边界
Co-authored-by: multica-agent <github@multica.ai>
2026-08-03 19:14:46 +00:00

19 lines
575 B
TypeScript

import { describe, expect, it } from "vitest";
import { demoSessions } from "./protocol/fixtures";
import { toSessionRow } from "./sessionPresentation";
describe("toSessionRow", () => {
it("将协议 Session 转换为稳定的表格展示值", () => {
expect(toSessionRow(demoSessions[0], new Date("2026-08-03T19:12:02Z"))).toEqual({
id: "NW-042",
status: "ONLINE",
host: "ws-fin-042",
user: "nora.chen",
os: "Windows 11 / amd64",
address: "10.42.8.17",
seen: "14s ago",
tags: ["finance", "priority"],
});
});
});