Skip to content

Commit 3459709

Browse files
committed
Harden markdown-row settle until formatted heading paints
The formatted-markdown settle predicate treated a missing "## Title" as formatted. A frame that had painted the link URL but not the heading yet satisfied that check and then failed toContain("Title"). The ###-heading test already requires the formatted body for the same reason.
1 parent bb58133 commit 3459709

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/tui/markdown-rows.test.ts

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

7474
const frame = await settle(
7575
h,
76-
(f) => f.includes("docs") && !f.includes("## Title") && !f.includes("**bolded**"),
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).
79+
(f) =>
80+
f.includes("Title") &&
81+
f.includes("bolded") &&
82+
f.includes("docs") &&
83+
!f.includes("## Title") &&
84+
!f.includes("**bolded**"),
7785
);
7886
expect(frame).toContain("Title");
7987
expect(frame).not.toContain("## Title");

0 commit comments

Comments
 (0)