فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(A02/A03): seed duplicate audit command through authorized legacy restore
davoodmehraban89 committed
Oct 20, 2026 at 08:40 UTC
0cbada3eb7cc45c3602bffa847d750268c6733d4
1 file changed
+3
-1
tests/a02-opening-posting-integration.test.mjs
+3
-1
@@ -4,7 +4,9 @@ import 'fake-indexeddb/auto';
4
import { StorageService } from '../src/core/StorageService.js';
5
6
// Seed historical fixtures atomically; standalone history writes are forbidden.
7
-const seedHistory = (store, row) => StorageService.transaction(store, tx => tx.put(store, row));
7
+const seedHistory = (store, row) => store === 'audit_events'
8
+ ? StorageService.importAll({ app: 'Factor-easyPro', version: 6, data: { audit_events: [row] } })
9
+ : StorageService.transaction(store, tx => tx.put(store, row));
10
import { OpeningBalanceService } from '../src/core/OpeningBalanceService.js';
11
import { AccountingService } from '../src/core/AccountingService.js';
12
import { CompanyService } from '../src/core/CompanyService.js';