Skip to content

Commit 65d32f1

Browse files
alfaozWolverinDEV
authored andcommitted
fix: address review suggestions on legacy replay parsing
- Rename regression test to cover all defaulted legacy fields - Constrain matchJoinTimeoutInMs to non-negative durations - Drop void prefix on test() to match repo style
1 parent 31a750c commit 65d32f1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/backend/src/persistence/gameHistoryRepository.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import test from 'node:test';
33

44
import { zDatabaseGame, zFinishedGameRecord } from '@ih3t/shared';
55

6-
void test(`parses legacy tournament replay records without live timeout fields`, () => {
6+
test(`parses legacy tournament replay records with defaulted timeout, pending extension, and profile fields`, () => {
77
const legacyTournamentGame = {
88
id: `game-1`,
99
version: 3,

packages/shared/src/tournaments.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ export const zSessionTournamentInfo = z.object({
570570
.nonnegative(),
571571
pendingExtension: z.boolean().default(false),
572572
matchJoinTimeoutInMs: z.number().int()
573+
.nonnegative()
573574
.nullable()
574575
.default(null),
575576
leftDisplayName: z.string().nullable(),

0 commit comments

Comments
 (0)