This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user