Wave 2 fix: correct bookWordmark test assertions (casing-only brands + bet365)

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) <noreply@anthropic.com>
This commit is contained in:
Kev
2026-07-13 13:22:49 -04:00
parent d3f18b6481
commit 4303aa68a4
+7 -3
View File
@@ -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)', () => {