mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-04 03:29:33 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
async function loadSubject() {
|
||||
return import("./session-path.ts");
|
||||
}
|
||||
|
||||
test("normalizes Windows separators and casing for session identity", async () => {
|
||||
const { sessionPathKey } = await loadSubject();
|
||||
|
||||
assert.equal(
|
||||
sessionPathKey("C:\\Users\\Alex\\.pi\\sessions\\Parent.jsonl", "win32"),
|
||||
sessionPathKey("c:/Users/Alex/.pi/sessions/parent.jsonl", "win32"),
|
||||
);
|
||||
});
|
||||
|
||||
test("preserves case when session paths are case-sensitive", async () => {
|
||||
const { sessionPathKey } = await loadSubject();
|
||||
|
||||
assert.notEqual(
|
||||
sessionPathKey("/var/lib/pi/Parent.jsonl", "linux"),
|
||||
sessionPathKey("/var/lib/pi/parent.jsonl", "linux"),
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user