const fs = require('fs'); // Read RunnerCard.spec.ts let content = fs.readFileSync('RunnerCard.spec.ts', 'utf8'); // Replace all gameStore.setLineup calls with proper setup content = content.replace(/gameStore\.setLineup\('home',/g, `gameStore.setGameState({ id: 1, home_team_id: 1, away_team_id: 2, status: 'active', inning: 1, half: 'top', outs: 0, home_score: 0, away_score: 0, home_team_abbrev: 'NYY', away_team_abbrev: 'BOS', home_team_dice_color: '3b82f6', current_batter: null, current_pitcher: null, on_first: null, on_second: null, on_third: null, decision_phase: 'idle', play_count: 0 }); gameStore.updateLineup(1,`); fs.writeFileSync('RunnerCard.spec.ts', content); // Read RunnersOnBase.spec.ts content = fs.readFileSync('RunnersOnBase.spec.ts', 'utf8'); // Replace all gameStore.setLineup calls content = content.replace(/gameStore\.setLineup\('home',/g, `gameStore.setGameState({ id: 1, home_team_id: 1, away_team_id: 2, status: 'active', inning: 1, half: 'top', outs: 0, home_score: 0, away_score: 0, home_team_abbrev: 'NYY', away_team_abbrev: 'BOS', home_team_dice_color: '3b82f6', current_batter: null, current_pitcher: null, on_first: null, on_second: null, on_third: null, decision_phase: 'idle', play_count: 0 }); gameStore.updateLineup(1,`); fs.writeFileSync('RunnersOnBase.spec.ts', content); console.log('Fixed test files');