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
+6 -6
View File
@@ -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