Order ranked emotes against delayed status responses
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user