0.4.0 — fix queue-add race + per-item remove button (#10, #11)

This commit is contained in:
2026-10-11 16:09:29 +00:00
parent 3287bcaca4
commit ef27b59762
14 changed files with 448 additions and 29 deletions
+6
View File
@@ -22,6 +22,7 @@ function makeState(id: string): GameState {
},
events: [],
pending: [],
version: 1,
};
}
@@ -54,6 +55,11 @@ describe('openDb', () => {
expect(db.load('a')?.events).toHaveLength(1);
expect([...db.listIds()].sort()).toEqual(['a', 'b']); // still two rows
// the monotonic version is persisted with the state and round-trips
s.version = 3;
db.save(s);
expect(db.load('a')?.version).toBe(3);
db.close();
});