diff --git a/packages/coding-agent/test/status-line-overflow.test.ts b/packages/coding-agent/test/status-line-overflow.test.ts index 77a1a97df..18c2779e0 100644 --- a/packages/coding-agent/test/status-line-overflow.test.ts +++ b/packages/coding-agent/test/status-line-overflow.test.ts @@ -144,10 +144,13 @@ describe("status line session accent", () => { } // Computed lazily: `theme` is assigned by initTheme() in beforeAll, after module evaluation. - const accentAnsi = () => - getSessionAccentAnsi( + const accentAnsi = (): string => { + const ansi = getSessionAccentAnsi( getSessionAccentHex("Named session", theme.getMajorThemeColorHexes(), theme.accentSurfaceLuminance), ); + if (!ansi) throw new Error("expected a session accent ANSI sequence for the test theme"); + return ansi; + }; it("paints the gap with the session accent when enabled", () => { const ansi = accentAnsi();