feat: preserve solo runs across production restarts

This commit is contained in:
jwinterm
2026-07-22 15:05:49 -04:00
parent b2772ff73b
commit 80d7f35e1f
37 changed files with 1816 additions and 160 deletions
+2 -2
View File
@@ -164,7 +164,7 @@ describe('solo terminal settlement retry', () => {
expect(harness.activeGames.has('socket-2')).toBe(false);
});
test('reconnect restores a pending terminal lock without re-counting it as a playable game', () => {
test('reconnect restores a pending terminal lock without re-counting it as a playable game', async () => {
jest.useFakeTimers();
const activeGames = new Map();
const suspended = new SuspendedGameManager({
@@ -181,7 +181,7 @@ describe('solo terminal settlement retry', () => {
const newUser = { joinGame: jest.fn() };
suspended.suspendGame(44, 'socket-old', game);
const restored = suspended.restoreGame(44, 'socket-new', newUser);
const restored = await suspended.restoreGame(44, 'socket-new', newUser);
expect(restored.game).toBe(game);
expect(activeGames.get('socket-new')).toBe(game);