Initial commit: add .gitignore and README

This commit is contained in:
defiQUG
2026-02-09 21:51:45 -08:00
commit 929fe6f6b6
240 changed files with 40977 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { TransactionManager } from '../../src/database/transaction-manager';
describe('TransactionManager', () => {
describe('executeInTransaction', () => {
it('should commit transaction on success', async () => {
const result = await TransactionManager.executeInTransaction(async (_client) => {
// Mock transaction
return { success: true };
});
expect(result).toEqual({ success: true });
});
it('should rollback transaction on error', async () => {
await expect(
TransactionManager.executeInTransaction(async (_client) => {
throw new Error('Test error');
})
).rejects.toThrow('Test error');
});
});
});