From 87617bef4c24429777db7d1c0cee7ba2f5d07568 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Thu, 29 Oct 2026 21:43:19 +0100 Subject: [PATCH] Fix a type error in the hint truncation test Co-Authored-By: Claude Opus 5.5 --- tests/hint.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hint.test.ts b/tests/hint.test.ts index fdfb5ed..f818adc 100644 --- a/tests/hint.test.ts +++ b/tests/hint.test.ts @@ -99,7 +99,7 @@ describe("fitHintToBudget (D-WS2a truncation rule)", () => { expect(` ${hint}`.startsWith(kept)).toBe(true); // Ends on a whole term: the next character of the hint is a separator. expect(kept.endsWith(",")).toBe(false); - expect([",", " "]).toContain(` ${hint}`[kept.length]); + expect([",", " "]).toContain(` ${hint}`.charAt(kept.length)); }); test("is deterministic", () => {