diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2026-11-19 08:53:51 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2026-11-19 08:53:51 +0100 |
| commit | b884441ba0d10bdd3559748507a0991888f66194 (patch) | |
| tree | 074321d353c1153e8d95191eecf5a61b2eec1096 /server/test/net/multiplayer_test.dart | |
| parent | d64cf3514e5ff1ddb1c7f3ddac9a769db3e7dde0 (diff) | |
Phase 6: settings, saves, localization parity (M6)
Diffstat (limited to 'server/test/net/multiplayer_test.dart')
| -rw-r--r-- | server/test/net/multiplayer_test.dart | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/test/net/multiplayer_test.dart b/server/test/net/multiplayer_test.dart index e3bb225..b336501 100644 --- a/server/test/net/multiplayer_test.dart +++ b/server/test/net/multiplayer_test.dart @@ -376,13 +376,16 @@ void main() { reason: 'current', ); - // undo: the state rolls back (the index carries the undone action's - // index, exactly like the reference app's server-side send). + // undo: the state rolls back. The wire index is the post-decrement one + // (the reference reports the pre-decrement index — its clients keep + // local state; our stateless web clients take the index at face value, + // so it must equal the state position). The description is the undone + // action's, as in the reference. table.bob.send({'t': 'undo'}); for (final client in table.everyone) { final update = await client.nextOf('update'); state = stateOf(update); - expect(update['index'], indexAtTurnDone); + expect(update['index'], indexAtTurnDone - 1); expect( TestClient.characterIn(state, 'Banner Spear')?['turnState'], 1, |
