Add heartbeat telemetry support
This commit is contained in:
@@ -43,6 +43,18 @@ async function records(guid = '2741626') {
|
||||
}>;
|
||||
}
|
||||
|
||||
it('refreshes stats during a round without adding rounds or completing the match', async () => {
|
||||
await report('game_start');
|
||||
await report('round_change', 30, [player(undefined, { kills: 100 })]);
|
||||
await report('heartbeat', 30, [player(undefined, { kills: 150 })]);
|
||||
await report('heartbeat', 30, [player(undefined, { kills: 150 })]);
|
||||
expect(await matches()).toEqual([expect.objectContaining({ status: 'active', highest_round: 30 })]);
|
||||
expect(await records()).toEqual([expect.objectContaining({ kills: 150, rounds_survived: 29, completed: 0 })]);
|
||||
await report('game_end', 30);
|
||||
await report('heartbeat', 30);
|
||||
expect((await matches()).map(match => match.status)).toEqual(['completed', 'active']);
|
||||
});
|
||||
|
||||
it('persists independent stat high-water marks without adding cumulative snapshots or retries', async () => {
|
||||
await report('game_start');
|
||||
await report('round_change', 1);
|
||||
|
||||
Reference in New Issue
Block a user