From effe3b52b891bda4097411a876bec4bdd747fdbb Mon Sep 17 00:00:00 2001 From: Nayan Date: Tue, 11 Aug 2026 23:32:38 +0530 Subject: [PATCH] test(server): assert the separator-independent source path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- packages/server/src/prompt-input.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/src/prompt-input.test.ts b/packages/server/src/prompt-input.test.ts index 5ed90a5..0d2fa9e 100644 --- a/packages/server/src/prompt-input.test.ts +++ b/packages/server/src/prompt-input.test.ts @@ -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"); }); });