test: fix mock configuration and lint errors in unit tests

- Fix logger mock missing default export in extractor.test.ts
- Fix performance-monitor mock configuration
- Fix prefer-const in validation-database.test.ts
- Fix no-unsafe-function-type in cleaner-handler.test.ts
- Fix no-empty-function in cleaner-application-service.test.ts
- Run prettier format on test files

All 622 tests now passing (59 files, 3 skipped)
This commit is contained in:
Misaka
2026-04-05 22:04:32 +08:00
parent c6f67e49a4
commit fb3bdbc493
5 changed files with 57 additions and 25 deletions

View File

@@ -18,7 +18,7 @@ vi.mock('../../../src/main/services/logger/error-utils', () => ({
}))
// In-memory storage for registered IPC handlers
const registeredHandlers: Map<string, Function> = new Map()
const registeredHandlers: Map<string, (...args: any[]) => any> = new Map()
// Mock Electron's ipcMain to capture registered handlers
vi.mock('electron', () => {