Session 7j: Soccer intelligence - 9 leagues, 11 signals, 6 traps, poller, prefetch, 131 new tests (1173 total)
This commit is contained in:
@@ -89,7 +89,7 @@ describe('oddsNormalizer', () => {
|
||||
expect(result[0].book).toBe('draftkings');
|
||||
});
|
||||
|
||||
it('maps all 8 market keys to correct internal stat_types', () => {
|
||||
it('maps every market key to its internal stat_type (NBA + soccer)', () => {
|
||||
const markets = Object.entries(MARKET_MAP);
|
||||
const bookmaker = makeBookmaker(
|
||||
'draftkings',
|
||||
@@ -109,6 +109,18 @@ describe('oddsNormalizer', () => {
|
||||
expect(statTypes).toEqual(expected);
|
||||
});
|
||||
|
||||
it('exposes the soccer market keys added in Session 7j', () => {
|
||||
// Sanity: soccer odds flow through the same normalizer as NBA. If a
|
||||
// future refactor splits MARKET_MAP per-sport, this test makes the
|
||||
// surface visible.
|
||||
const soccerStatTypes = ['goals', 'shots_on_target', 'shots', 'tackles',
|
||||
'cards', 'corners', 'saves', 'goals_conceded', 'passes', 'clean_sheet'];
|
||||
const values = Object.values(MARKET_MAP);
|
||||
for (const t of soccerStatTypes) {
|
||||
expect(values).toContain(t);
|
||||
}
|
||||
});
|
||||
|
||||
it('handles missing/null odds gracefully (skips incomplete outcomes)', () => {
|
||||
const event = makeEvent({
|
||||
bookmakers: [
|
||||
|
||||
Reference in New Issue
Block a user