diff --git a/tests/smoke.test.cjs b/tests/smoke.test.cjs index 710cf84..1f6a3c9 100644 --- a/tests/smoke.test.cjs +++ b/tests/smoke.test.cjs @@ -269,6 +269,8 @@ check('writes made during the first sync are queued and follow the server Inbox const remap = merge.indexOf('await db.update(tasks).set({ listId: serverInboxId }).where(eq(tasks.listId, INBOX_ID));'); const pending = merge.indexOf('remapInboxEntry(entry, serverInboxId)'); assert.ok(remap >= 0 && pending > remap, 'the pending entries follow the server Inbox after the local remap'); + assert.match(merge, /const remapped = remapInboxEntry\(entry, serverInboxId\);\s*if \(remapped\) await db\.update\(syncOutbox\)\.set\(remapped\)\.where\(eq\(syncOutbox\.id, entry\.id\)\);/, 'the remapped entry is written back'); + assert.match(merge, /const pending = await db\.select\(\)\.from\(syncOutbox\)\.where\(isNull\(syncOutbox\.syncedAt\)\);\s*for \(const entry of pending\) \{/, 'every unsent entry is remapped'); }); // No merge across accounts (#165). firstSyncChoice and canSync are executed