Wave 2B: sportsbook wordmarks + team-logo coverage
MISSION 1 — real sportsbook wordmarks (kills lowercase "betmgm"):
- books.js: add the 6 missing ALLOWED_BOOKS keys (fanatics/bet365/
hardrockbet/betrivers/pointsbet/pinnacle) with real brand names +
colors — no live book falls to neutral gray. Add `slug` fields +
bookSlug()/hasBookSvg() + BUNDLED_BOOK_SVGS.
- Bundle 8 self-authored styled-text wordmark SVGs under
web/public/books/{slug}.svg (draftkings/fanduel/betmgm/caesars/
bet365/pinnacle/hardrockbet/betrivers). NOT copied trademarked logo
glyphs — the book's NAME in brand weight+color; official press-kit
art can drop into the same paths with zero code change.
- BookWordmark: render the local SVG when bundled, else the brand-color
styled-text fallback (never a broken image; never a lowercase key).
- Import BookWordmark into the ledger row (page.tsx:368) + the identical
public-profile row, replacing bare {row.book} text. vyndr/GameCard
line-grid book cell now proper-cases via bookInfo().name (keeps the
preferred-book green highlight).
MISSION 2 — team-logo coverage gaps:
- teamMeta.js: add ESPN-schedule ball-sport abbr aliases the feed emits
that fell to monograms — SA→SAS, NY→NYK, WSH→WAS, BRK→BKN (NBA),
CONN→CON (WNBA). Real-abbr-first lookup means MLB WSH (Nationals) +
WNBA NY (Liberty) still resolve directly; NY in MLB stays null.
Tests: new tests/unit/bookWordmark.test.js (all 10 ALLOWED_BOOKS resolve
to a real brand+non-gray color; 8 bundled SVGs exist; BookWordmark
SVG-first + no-lowercase-leak; ledger/profile import + use BookWordmark).
entityLayer.test.js extended for the new aliases. Full suite green
(239 suites / 2891 tests); next build exit 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,25 @@ describe('resolveTeam — abbr / full name / nickname / alias', () => {
|
||||
expect(resolveTeam('ARI', 'mlb').abbr).toBe('AZ');
|
||||
expect(resolveTeam('CHW', 'mlb').abbr).toBe('CWS');
|
||||
});
|
||||
test('ESPN-schedule ball-sport abbr aliases (Wave 2B)', () => {
|
||||
// NBA abbrs the ESPN schedule emits that used to fall to a monogram
|
||||
expect(resolveTeam('SA', 'nba').abbr).toBe('SAS'); // Spurs
|
||||
expect(resolveTeam('NY', 'nba').abbr).toBe('NYK'); // Knicks
|
||||
expect(resolveTeam('WSH', 'nba').abbr).toBe('WAS'); // Wizards
|
||||
expect(resolveTeam('BRK', 'nba').abbr).toBe('BKN'); // Nets
|
||||
// WNBA
|
||||
expect(resolveTeam('CONN', 'wnba').abbr).toBe('CON'); // Sun
|
||||
expect(resolveTeam('WSH', 'wnba').abbr).toBe('WAS'); // Mystics
|
||||
});
|
||||
test('global alias never shadows a real same-abbr team in another sport', () => {
|
||||
// WSH is a real MLB abbr (Nationals) — must resolve directly, NOT via the
|
||||
// NBA/WNBA WSH→WAS alias.
|
||||
expect(resolveTeam('WSH', 'mlb').name).toBe('Washington Nationals');
|
||||
// NY is the WNBA Liberty's real abbr — direct hit, not the NBA NY→NYK alias.
|
||||
expect(resolveTeam('NY', 'wnba').name).toBe('New York Liberty');
|
||||
// NY is genuinely ambiguous in MLB (NYY/NYM) → stays null, never guessed.
|
||||
expect(resolveTeam('NY', 'mlb')).toBeNull();
|
||||
});
|
||||
test('unknown team → null (never a fake)', () => {
|
||||
expect(resolveTeam('ZZZ', 'mlb')).toBeNull();
|
||||
expect(resolveTeam('', 'mlb')).toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user