This commit is contained in:
@@ -18,6 +18,7 @@ const report = (days: number) => ({
|
||||
summary: totals,
|
||||
running: { average: null, peak: 0, capturedHours: 0 },
|
||||
matches: emptyMatches,
|
||||
players: { uniquePlayers: null, newPlayers: null, historyStartAt: null },
|
||||
autoscaling: {
|
||||
added: 0,
|
||||
removed: 0,
|
||||
@@ -286,11 +287,22 @@ describe('metrics background refresh', () => {
|
||||
startAt: 0,
|
||||
endAt: 1000,
|
||||
partial: true,
|
||||
uniquePlayers: 0,
|
||||
newPlayers: 0,
|
||||
playerHistoryPartial: false,
|
||||
capturedHours: 1 / 3600
|
||||
}
|
||||
]
|
||||
};
|
||||
const invalid = [
|
||||
{ ...value, players: undefined },
|
||||
{ ...value, players: { uniquePlayers: 1, newPlayers: 0 } },
|
||||
...[undefined, -1, 1.5, '2'].map((newPlayers) => ({
|
||||
...value,
|
||||
players: { ...value.players, newPlayers }
|
||||
})),
|
||||
{ ...value, points: [{ ...value.points[0], uniquePlayers: undefined }] },
|
||||
{ ...value, points: [{ ...value.points[0], playerHistoryPartial: undefined }] },
|
||||
{ ...value, maps: [{ ...value.maps[0], running: undefined }] },
|
||||
{
|
||||
...value,
|
||||
|
||||
Reference in New Issue
Block a user