Order ranked emotes against delayed status responses

This commit is contained in:
2026-10-15 00:14:17 +09:00
parent 013807c873
commit 32d00bb60a
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -25,9 +25,11 @@ test('ranked emotes authenticate membership, reach both players and preserve hid
const matchId = paired.match!.matchId;
await f.clock.advance(paired.match!.startsAt - f.clock.now());
await f.service.action('player-a', f.a.gameSessionId, matchId, 1, 'charge');
const before = await f.service.status('player-b', f.b.gameSessionId);
const sent = await f.service.emote('player-a', f.a.gameSessionId, matchId, 'greet');
const received = await f.service.status('player-b', f.b.gameSessionId);
assert.equal(received.match!.emotes?.[0]?.id, 'greet');
assert.ok(received.match!.version > before.match!.version, 'an older poll cannot overwrite this emote');
assert.deepEqual(received.match!.emotes, sent.match!.emotes);
assert.equal(received.match!.ownAction, null);
assert.deepEqual(received.match!.energy, [0, 0]);