فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(A03): retain explicit atomic full reset while blocking partial history clear

davoodmehraban89 committed Oct 16, 2026 at 23:33 UTC db5d6b3ff59b3fb0c9c3d3248c5d670cde47d277
1 file changed +5
tests/a03-direct-append-only-protection.test.mjs
+5
@@ -78,4 +78,9 @@ test('A03: transaction clear cannot erase either append-only history store or co
78 await StorageService.put('contacts', { id: 'temporary', companyId: 'c1', name: 'Disposable' });
79 await StorageService.transaction('contacts', async tx => tx.clear('contacts'));
80 assert.equal((await StorageService.getAll('contacts')).length, 0);
81 + // Explicit maintenance reset retains the previous full-database semantics.
82 + // It is NOT exposed as a normal transaction clear of immutable history.
83 + await StorageService.clearAll();
84 + assert.equal((await StorageService.getAll('audit_events')).length, 0);
85 + assert.equal((await StorageService.getAll('document_corrections')).length, 0);
86 });