[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay
5

Configure Feed

Select the types of activity you want to include in your feed.

test: failing repro for default-foreground

Nate Moore (Jun 4, 2026, 12:51 AM -0500) ca558cbe d75fb4b6

+22
+22
test/default-foreground.test.ts
··· 1 + import { describe, expect, it } from "./suite.ts"; 2 + import { createTerm } from "../term.ts"; 3 + import { close, grow, open, text } from "../ops.ts"; 4 + 5 + const decode = (b: Uint8Array) => new TextDecoder().decode(b); 6 + 7 + describe("true default foreground", () => { 8 + it("uncolored text emits no concrete foreground", async () => { 9 + let term = await createTerm({ width: 12, height: 1 }); 10 + let ansi = decode( 11 + term.render([ 12 + open("root", { layout: { width: grow(), height: grow() } }), 13 + text("hi"), 14 + close(), 15 + ]).output, 16 + ); 17 + 18 + let before = ansi.slice(0, ansi.indexOf("h")); 19 + // pins: color-less text must leave the terminal default fg, not force white 20 + expect(before).not.toContain("\x1b[38;2;255;255;255"); 21 + }); 22 + });