fix: convert player IDs from number to string in arcade tests
Change all player ID values from numeric (1) to string ("1")
to match the arcade session schema.
The arcade session system uses string IDs for players, not
numbers. This aligns test data with production types.
Fixes 8 TS2322 errors in arcade session tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -45,12 +45,12 @@ describe('Arcade Session Integration', () => {
|
||||
difficulty: 6,
|
||||
turnTimer: 30,
|
||||
gamePhase: 'setup',
|
||||
currentPlayer: 1,
|
||||
currentPlayer: "1",
|
||||
matchedPairs: 0,
|
||||
totalPairs: 6,
|
||||
moves: 0,
|
||||
scores: {},
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
consecutiveMatches: {},
|
||||
gameStartTime: null,
|
||||
gameEndTime: null,
|
||||
@@ -67,7 +67,7 @@ describe('Arcade Session Integration', () => {
|
||||
gameName: 'matching',
|
||||
gameUrl: '/arcade/matching',
|
||||
initialState,
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
})
|
||||
|
||||
expect(session).toBeDefined()
|
||||
@@ -86,7 +86,7 @@ describe('Arcade Session Integration', () => {
|
||||
playerId: testUserId,
|
||||
timestamp: Date.now(),
|
||||
data: {
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -147,12 +147,12 @@ describe('Arcade Session Integration', () => {
|
||||
difficulty: 6,
|
||||
turnTimer: 30,
|
||||
gamePhase: 'playing',
|
||||
currentPlayer: 1,
|
||||
currentPlayer: "1",
|
||||
matchedPairs: 0,
|
||||
totalPairs: 6,
|
||||
moves: 0,
|
||||
scores: { 1: 0 },
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
consecutiveMatches: { 1: 0 },
|
||||
gameStartTime: Date.now(),
|
||||
gameEndTime: null,
|
||||
@@ -169,7 +169,7 @@ describe('Arcade Session Integration', () => {
|
||||
gameName: 'matching',
|
||||
gameUrl: '/arcade/matching',
|
||||
initialState: playingState,
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
})
|
||||
|
||||
// First move: flip card 1
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('session-manager', () => {
|
||||
gameName: 'matching',
|
||||
gameUrl: '/arcade/matching',
|
||||
initialState: {},
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
})
|
||||
|
||||
// Verify user lookup by guestId
|
||||
@@ -159,7 +159,7 @@ describe('session-manager', () => {
|
||||
gameName: 'matching',
|
||||
gameUrl: '/arcade/matching',
|
||||
initialState: {},
|
||||
activePlayers: [1],
|
||||
activePlayers: ["1"],
|
||||
})
|
||||
|
||||
// Verify user was created
|
||||
|
||||
Reference in New Issue
Block a user