Skip to content

Commit 6d3be92

Browse files
committed
Wait for fence and link formatting before settling markdown rows
Formatted heading and bold can paint while fence markers and link syntax are still literal. Settle now requires those negatives too, matching the rest of the test's assertions.
1 parent f6d2260 commit 6d3be92

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/tui/markdown-rows.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,20 @@ describe("markdown transcript rows", () => {
7373

7474
const frame = await settle(
7575
h,
76-
// Require formatted heading and bold: "docs" plus absence of "## Title"
77-
// can match a frame where the heading has not painted yet (same class as
78-
// the ### heading flake below).
76+
// Require formatted heading, bold, fence, and link: "docs" plus
77+
// absence of "## Title" can match a frame where the heading has not
78+
// painted yet, and formatted heading+bold can land while fence/link
79+
// syntax is still literal (same class as the ### heading flake below).
7980
(f) =>
8081
f.includes("Title") &&
8182
f.includes("bolded") &&
8283
f.includes("docs") &&
84+
f.includes("alpha") &&
85+
f.includes("const x = 1") &&
8386
!f.includes("## Title") &&
84-
!f.includes("**bolded**"),
87+
!f.includes("**bolded**") &&
88+
!f.includes("```") &&
89+
!f.includes("](https://example.com/docs)"),
8590
);
8691
expect(frame).toContain("Title");
8792
expect(frame).not.toContain("## Title");

0 commit comments

Comments
 (0)