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", () => {