This commit is contained in:
@@ -140,7 +140,7 @@ it('resolves tied bests by earliest completion, receipt time for unknown endings
|
||||
const { getLeaderboard } = await import('../../src/lib/server/fleet/leaderboard.js');
|
||||
const { getPlayerProfile } = await import('../../src/lib/server/fleet/player-profile.js');
|
||||
for (const records of [getLeaderboard().entries[0].records, getPlayerProfile('101')!.records]) {
|
||||
for (const record of Object.values(records))
|
||||
for (const record of Object.values(records!))
|
||||
expect(record).toMatchObject({ matchId: 3, endedAt: null });
|
||||
}
|
||||
});
|
||||
@@ -245,19 +245,19 @@ it('records first observed rounds for start participants and late arrivals witho
|
||||
report('game_end', 52, [player('101', 200), player('202', 40), player('303')], 4);
|
||||
closeDb();
|
||||
const { getPlayerProfile } = await import('../../src/lib/server/fleet/player-profile.js');
|
||||
expect(getPlayerProfile('101')!.records.highestRound).toMatchObject({
|
||||
expect(getPlayerProfile('101')!.records?.highestRound).toMatchObject({
|
||||
value: 52,
|
||||
startObserved: true,
|
||||
firstObservedRound: 0,
|
||||
presentAtStart: true
|
||||
});
|
||||
expect(getPlayerProfile('202')!.records.highestRound).toMatchObject({
|
||||
expect(getPlayerProfile('202')!.records?.highestRound).toMatchObject({
|
||||
value: 52,
|
||||
startObserved: true,
|
||||
firstObservedRound: 50,
|
||||
presentAtStart: false
|
||||
});
|
||||
expect(getPlayerProfile('303')!.records.highestRound).toMatchObject({
|
||||
expect(getPlayerProfile('303')!.records?.highestRound).toMatchObject({
|
||||
value: 52,
|
||||
startObserved: true,
|
||||
firstObservedRound: 0,
|
||||
@@ -315,13 +315,13 @@ it('migrates legacy participation as unknown before snapshot backfill and preser
|
||||
});
|
||||
closeDb();
|
||||
const { getPlayerProfile } = await import('../../src/lib/server/fleet/player-profile.js');
|
||||
expect(getPlayerProfile('101')!.records.bestKills).toMatchObject({
|
||||
expect(getPlayerProfile('101')!.records?.bestKills).toMatchObject({
|
||||
matchId: 1,
|
||||
value: 150,
|
||||
firstObservedRound: null,
|
||||
presentAtStart: null
|
||||
});
|
||||
expect(getPlayerProfile('202')!.records.highestRound).toMatchObject({
|
||||
expect(getPlayerProfile('202')!.records?.highestRound).toMatchObject({
|
||||
firstObservedRound: 8,
|
||||
startObserved: false,
|
||||
presentAtStart: false
|
||||
|
||||
Reference in New Issue
Block a user