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:
@@ -25,15 +25,18 @@ vi.mock('../../../../src/main/services/logger', () => {
|
||||
}
|
||||
|
||||
return {
|
||||
default: mockLogger,
|
||||
createLogger: vi.fn(() => mockLogger),
|
||||
withRequestContext: vi.fn(async (fn) => fn()),
|
||||
getRequestId: vi.fn(() => 'test-request-id')
|
||||
}
|
||||
})
|
||||
|
||||
vi.mock('../../../../src/main/services/logger/performance-monitor', () => ({
|
||||
trackDuration: vi.fn(async (fn) => ({ result: await fn() }))
|
||||
}))
|
||||
vi.mock('../../../../src/main/services/logger/performance-monitor', () => {
|
||||
return {
|
||||
trackDuration: vi.fn(async (fn) => ({ result: await fn() }))
|
||||
}
|
||||
})
|
||||
|
||||
// Mock ExcelParser - reset in beforeEach
|
||||
let mockExcelParserInstance: any
|
||||
|
||||
Reference in New Issue
Block a user