Show profiles for players without qualifying matches
CI / checks (push) Successful in 4m56s

This commit is contained in:
2026-10-10 13:50:53 -04:00
parent cc9c10226e
commit bd34c3c9e7
11 changed files with 271 additions and 87 deletions
+16 -2
View File
@@ -117,7 +117,14 @@ describe('persisted leaderboard queries', () => {
)
.run(id, guid);
}
expect(getPlayerProfile(status)).toBeNull();
expect(getPlayerProfile(status)).toMatchObject({
name: status,
stats: { gamesPlayed: 0, kills: 0, highestRound: 0 },
records: null,
maps: [],
matches: [],
matchesTotal: 0
});
expect(getLeaderboard({ map: `t5:${status}` })).toMatchObject({
entries: [],
total: 0,
@@ -594,7 +601,14 @@ describe('player profiles', () => {
maps: [expect.objectContaining({ game: 't6' })],
matches: [expect.objectContaining({ game: 't6' })]
});
expect(getPlayerProfile('404')).toBeNull();
expect(getPlayerProfile('404')).toMatchObject({
name: 'No stats',
stats: { gamesPlayed: 0, kills: 0, highestRound: 0 },
records: null,
maps: [],
matches: [],
matchesTotal: 0
});
expect(getPlayerProfile("' OR 1=1 --")).toBeNull();
});