From 4303aa68a42a05ff90bdc766d5b422a27c6a2327 Mon Sep 17 00:00:00 2001 From: Kev Date: Mon, 13 Jul 2026 13:22:49 -0400 Subject: [PATCH] Wave 2 fix: correct bookWordmark test assertions (casing-only brands + bet365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The merged suite exposed two self-defeating assertions in 2B's book test: uppercasing the name before comparing to the key false-failed correct brand names (DraftKings→DRAFTKINGS), and the lowercase-echo guard rejected bet365 whose official wordmark IS lowercase. bookInfo output was always correct. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/unit/bookWordmark.test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/unit/bookWordmark.test.js b/tests/unit/bookWordmark.test.js index 0c6b9e4..416b74a 100644 --- a/tests/unit/bookWordmark.test.js +++ b/tests/unit/bookWordmark.test.js @@ -19,13 +19,17 @@ describe('bookInfo — every ALLOWED_BOOK is a real brand (no neutral-gray fall) test.each(ALLOWED_BOOKS)('%s resolves to a real brand name + color', (key) => { const b = bookInfo(key); // name must be a real brand, not the raw uppercased key echoed back + // (compare the ACTUAL name to the uppercased key — do NOT uppercase the + // name, or a correct casing-only brand like "DraftKings" would trivially + // equal "DRAFTKINGS" and false-fail; "bet365" ≠ "BET365" still passes). expect(b.name).toBeTruthy(); - expect(b.name.toUpperCase()).not.toBe(key.toUpperCase()); + expect(b.name).not.toBe(key.toUpperCase()); // color must not be the neutral-gray default expect(b.fg).toBeTruthy(); expect(b.fg.toLowerCase()).not.toBe(DEFAULT_FG.toLowerCase()); - // never a bare lowercase feed key in the display name - expect(b.name).not.toBe(key); + // never a bare lowercase feed key echoed as the display name — EXCEPT + // bet365, whose official brand wordmark genuinely is lowercase "bet365". + if (key !== 'bet365') expect(b.name).not.toBe(key); }); test('the 6 previously-missing keys now resolve (were gray)', () => {