From 06aecdd51f07e689e970ceaa180abe2be0c14bbb Mon Sep 17 00:00:00 2001 From: can1357 Date: Wed, 12 Aug 2026 03:48:34 +0200 Subject: [PATCH] test(read): aligned markdown preview expectation with addressable line split - displayContent mirrors addressable rows since 21a7693dd7, so the terminal newline is no longer part of the preview text. --- packages/coding-agent/test/read-summary.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/test/read-summary.test.ts b/packages/coding-agent/test/read-summary.test.ts index 6a2080860..527e727ea 100644 --- a/packages/coding-agent/test/read-summary.test.ts +++ b/packages/coding-agent/test/read-summary.test.ts @@ -134,12 +134,13 @@ describe("read summary", () => { }); expect(defaultResult.details?.contentType).toBeUndefined(); - // Opt-in: tagged for the TUI preview while the model-facing text stays verbatim. + // Opt-in: tagged for the TUI preview. The preview text mirrors the addressable + // rows, so the file's terminal newline is not included (see splitAddressableFileLines). const result = await previewTool.execute(`read-summary-markdown-${extension}`, { path: fixture }); const text = textOutput(result); expect(result.details?.contentType).toBe("text/markdown"); - expect(result.details?.displayContent?.text).toBe(markdown); + expect(result.details?.displayContent?.text).toBe("# Heading\n\nSome **bold** text."); expect(text.split("\n")[0]).toMatch(new RegExp(`^\\[fixture\\.${extension}#[0-9A-F]{4}\\]$`)); expect(text).toContain("1:# Heading"); expect(text).toContain("3:Some **bold** text.");