The Bet Insights widget uses the testMarkets
prop to allow clients to test and verify the mapping of markets and outcomes.
Enabling this prop generates mocked markets and outcomes for a specific matchId, helping to ensure and verify correct mapping for each market.
This prop is only needed for self-hosted adapter implementations.
Simple version
For quick testing only market ids are required (predefined specifiers are automatically added where needed).
In such cases, the following format can be used:
7|8
Advanced format with specifiers
Using advanced format allows for generation of mocks with different (or even multiple) values instead of predefined specifier values.
It should be a string with the following format:
marketId1;specifier1,specifier2|marketId2;specifier1,specifier2
There are multiple supported delimiters:
|
delimits multiple market configurations;
delimitsmarketId
and specifiers config for that market,
delimits multiple specifier sets for one market&
delimits multiple specifiers within the same specifier set (some markets use more that one specifier)
Specifiers
Specifier is a key-value pair. Multiple specifiers are separated by comma. Example:
7;score=1:0,score=1:1|8;total=0.5,total=1.5
Multiple specifiers
testMarkets
prop accepts multiple specifiers as a set for testing.
Example market "{%player} total shots (inc. overtime)" (market_id: 1183) uses number of goals (total
) and player id (player
) specifiers.
testMarkets
value for testing this market with two sets of specifiers would look like this:
1183|total=0.5&player=sr:player:1234,total=1.5&player=sr:player:2345