Extract matching logic into lib/coaster-match.ts (isCoasterMatch + normalizeForMatch) so it can be imported by both the scraper and tests without duplication. Add tests/coaster-matching.test.ts covering all known match/false-positive cases: - Trademark symbols, leading THE, possessives, punctuation - Subtitle variants in both directions (Apocalypse, New Revolution - Classic) - Space-split brand words (BAT GIRL vs Batgirl) - 4D subtitle extension (THE JOKER™ 4D Free Fly Coaster vs Joker) - False positives: Joker y Harley Quinn, conjunction connectors Run with: npm test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
893 B
893 B