Skip to content

Commit f562153

Browse files
test(shared): pin dark badge fallback text to near-black
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 8cf2612 commit f562153

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎packages/shared/src/terminalOutput.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,10 @@ describe("terminalOutputSpans", () => {
264264
expect(spans.at(-1)?.style).toBeNull();
265265
expect(spans.map((span) => span.text).join("")).toBe("xy".repeat(50));
266266
});
267+
268+
it("gives badge text at least 3:1 on the dark palette's coloured backgrounds", () => {
269+
const text = normalizeTerminalOutput("\u001b[42m PASS \u001b[1;37;41m FAIL ").text;
270+
const spans = terminalOutputSpans(text, TERMINAL_PALETTES.dark);
271+
expect(spans.map((span) => span.style?.color)).toEqual(["#1f2328", "#1f2328"]);
272+
});
267273
});

0 commit comments

Comments
 (0)