test: make cortex path assertions platform neutral

This commit is contained in:
Marc J Saint-jour 2026-03-12 19:26:16 -04:00
parent f7a08ecc96
commit 12fcdb8c33

View File

@ -28,12 +28,14 @@ afterEach(() => {
describe("cortex bridge", () => {
it("resolves the default graph path inside the workspace", () => {
expect(resolveCortexGraphPath("/tmp/workspace")).toBe("/tmp/workspace/.cortex/context.json");
expect(resolveCortexGraphPath("/tmp/workspace")).toBe(
path.normalize(path.join("/tmp/workspace", ".cortex", "context.json")),
);
});
it("resolves relative graph overrides against the workspace", () => {
expect(resolveCortexGraphPath("/tmp/workspace", "graphs/main.json")).toBe(
path.normalize("/tmp/workspace/graphs/main.json"),
path.normalize(path.resolve("/tmp/workspace", "graphs/main.json")),
);
});