Count only completed games in player leaderboards

This commit is contained in:
2026-10-01 12:05:19 -04:00
parent 0cb48c435e
commit 13963cba1c
10 changed files with 83 additions and 29 deletions
+3
View File
@@ -117,6 +117,9 @@ describe('completed match details', () => {
// A start-only participant can still have a valid profile from another match.
await report('game_start', 0, [player('303')]);
await report('heartbeat', 3, [player('303')]);
expect(getMatchDetail(1)!.players.find(entry => entry.guid === '303')).toMatchObject({ canViewProfile: false });
expect(getPlayerProfile('303')).toBeNull();
await report('game_end', 3, [player('303')]);
participants = getMatchDetail(1)!.players;
expect(participants.find(entry => entry.guid === '303')).toMatchObject({ hasStats: false, canViewProfile: true });