refactor(audit): type-safe enums, expanded coverage, and crash-safe logging
Replace magic strings with AuditAction/AuditStatus enums across all consumers, add logAuditWithCurrentUser() convenience wrapper, extend audit coverage to data import, result export, app update, and ERP credentials operations, and harden crash handlers with try/catch to prevent audit failures from cascading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,10 @@ describe('MySqlService Unit Tests', () => {
|
||||
it('should execute SELECT and return rows with columns', async () => {
|
||||
await service.connect()
|
||||
mockExecute.mockResolvedValue([
|
||||
[{ id: 1, name: 'test' }, { id: 2, name: 'foo' }],
|
||||
[
|
||||
{ id: 1, name: 'test' },
|
||||
{ id: 2, name: 'foo' }
|
||||
],
|
||||
[{ name: 'id' }, { name: 'name' }]
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user