@davoodmehraban89 / Factor-easy / commits / 4ba4dbc
Fork 0

سامانه صدور فاکتور و حسابداری

test: align commerce and sync invariants with authoritative RPC

davoodmehraban89 committed Nov 17, 2026 at 17:14 UTC 4ba4dbccbe05635ebba9189eed65239c0ab191a1
1 file changed +1 -1
scripts/journal-rpc-adapter.test.mjs
+1 -1
@@ -268,7 +268,7 @@ test('source finalizers no longer create or post journal rows through the legacy
268 test('sync hydration reads database row version required by journal CAS operations',async()=>{
269 const syncSource=await readFile(new URL('../js/sync.js',import.meta.url),'utf8');
270 assert.match(syncSource,/select\('collection,id,data,version'\)/);
271 - assert.match(syncSource,/obj\._serverVersion=Number\(r\.version\)/);
271 + assert.match(syncSource,/obj\._serverVersion=rowVersion/);\n assert.match(syncSource,/snapVersions\.set\(key,rowVersion\)/);\n assert.match(syncSource,/Number\(r\.version\)/);
272 assert.match(syncSource,/p_organization_id:currentUser\.organizationId\|\|null/);
273 assert.match(syncSource,/sb\.rpc\('finora_sync_records_v2'/);
274 assert.match(syncSource,/expected_version:r\.expectedVersion/);