Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/rei-standard-amsg/instant/test/e2e.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ describe('e2e: push payload contract parity with amsg-server', () => {
for (const call of router.pushCalls) {
backups.push(JSON.parse(await decryptCapturedPushBody(call.body, subKit)));
}
// Backup pushes are fired concurrently (`backupWork` in index.js) —
// each races through its own async encryption before calling fetch,
// so interception order is NOT the SSE order. Normalize by
// messageIndex: the contract under test is that a given index
// carries the same messageId on both transports.
backups.sort((a, b) => a.messageIndex - b.messageIndex);
assert.equal(backups[0].messageId, payloads[0].messageId);
assert.equal(backups[1].messageId, payloads[1].messageId);
});
Expand Down
Loading