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.
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user