test(server): assert the separator-independent source path

`SourceLocation.file` is normalized to forward slashes now — it goes into the
edit prompt, into the JSON an MCP tool returns where each backslash arrives
doubled, and into the overlay as a display label. The assertion still built its
expectation with `join`, so it demanded a native path and failed on Windows
against the value the resolver is now meant to produce.
This commit is contained in:
Nayan
2026-08-11 23:32:38 +05:30
parent 3f193ac4f2
commit effe3b52b8
+5 -1
View File
@@ -163,7 +163,11 @@ describe("preparePromptInput — source backfill", () => {
source: { file: "/src/App.tsx", line: 4 },
})
);
expect(input.source?.file).toBe(join("src", "App.tsx"));
// Forward slashes, not `join`: this value is separator-independent by
// design. It goes into the edit prompt, into the JSON an MCP tool returns
// (where a backslash arrives doubled), and into the overlay as a label, so
// the resolver normalizes it rather than emitting a native path.
expect(input.source?.file).toBe("src/App.tsx");
expect(input.source?.context).toContain("Get Started");
});
});