@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / be4017d
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 01:45 UTC

fix: restore JavaScript test file newlines

davoodmehraban89 committed Nov 17, 2026 at 17:16 UTC be4017d6c2e2b11e0ba287358054711a8ae982dd
1 file changed +7 -3
scripts/journal-rpc-adapter.test.mjs
+7 -3
@@ -247,9 +247,11 @@ test('source finalizers no longer create or post journal rows through the legacy
247 const invoiceSource=await readFile(new URL('../js/invoices.js',import.meta.url),'utf8');
248 const purchaseSource=await readFile(new URL('../js/purchases.js',import.meta.url),'utf8');
249 const invoiceStart=invoiceSource.indexOf('async function finalizeInvoiceDocument(invoiceId)');
250 - const invoiceEnd=invoiceSource.indexOf('\nasync function finalizeInvoiceDocumentUi',invoiceStart);
250 + const invoiceEnd=invoiceSource.indexOf('
251 +async function finalizeInvoiceDocumentUi',invoiceStart);
252 const purchaseStart=purchaseSource.indexOf('window.finalizePurchasePilotDraft=async function');
252 - const purchaseEnd=purchaseSource.indexOf('\n window.deletePurchasePilotDraft',purchaseStart);
253 + const purchaseEnd=purchaseSource.indexOf('
254 + window.deletePurchasePilotDraft',purchaseStart);
255 assert.ok(invoiceStart>=0&&invoiceEnd>invoiceStart);
256 assert.ok(purchaseStart>=0&&purchaseEnd>purchaseStart);
257 const invoiceFinalizer=invoiceSource.slice(invoiceStart,invoiceEnd);
@@ -268,7 +270,9 @@ test('source finalizers no longer create or post journal rows through the legacy
270 test('sync hydration reads database row version required by journal CAS operations',async()=>{
271 const syncSource=await readFile(new URL('../js/sync.js',import.meta.url),'utf8');
272 assert.match(syncSource,/select\('collection,id,data,version'\)/);
271 - assert.match(syncSource,/obj\._serverVersion=rowVersion/);\n assert.match(syncSource,/snapVersions\.set\(key,rowVersion\)/);\n assert.match(syncSource,/Number\(r\.version\)/);
273 + assert.match(syncSource,/obj\._serverVersion=rowVersion/);
274 + assert.match(syncSource,/snapVersions\.set\(key,rowVersion\)/);
275 + assert.match(syncSource,/Number\(r\.version\)/);
276 assert.match(syncSource,/p_organization_id:currentUser\.organizationId\|\|null/);
277 assert.match(syncSource,/sb\.rpc\('finora_sync_records_v2'/);
278 assert.match(syncSource,/expected_version:r\.expectedVersion/);