Skip to content

Commit dbce592

Browse files
marcstraubeclaude
andauthored
fix(test): stabilize flaky OfflineQueue integration test (#62)
## Summary - Sort processed items before comparing in the persistence test to avoid non-deterministic IndexedDB retrieval order when items share the same millisecond timestamp - Priority ordering is covered by a separate dedicated test Root cause: CI run [#24568534617](https://github.com/marcstraube/zappzarapp-node-browser-utils/actions/runs/24568534617) failed with `expected [ 'item-2', 'item-1' ] to deeply equal [ 'item-1', 'item-2' ]` in the Stryker mutation run. ## Test plan - [x] All 4206 tests pass - [x] Priority ordering test unchanged and still validates correct behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ab0916c commit dbce592

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/integration/OfflineQueueSync.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('OfflineQueue + IndexedDB + NetworkStatus', () => {
7272

7373
await queue.sync();
7474

75-
expect(processed).toEqual(['item-1', 'item-2']);
75+
expect(processed.sort()).toEqual(['item-1', 'item-2']);
7676
expect(await queue.size()).toBe(0);
7777

7878
queue.destroy();

0 commit comments

Comments
 (0)