mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-25 20:15:37 +02:00
- Add explicit return types to functions across main, preload, and renderer - Replace `any` types with specific types or eslint-disable comments - Fix unused variables by removing or prefixing with underscore - Add eslint-disable for react-refresh/only-export-components - Fix React hooks dependency warnings - Add test mocks for electron-log/main and @electron-toolkit/utils Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
604 B
TypeScript
34 lines
604 B
TypeScript
import { vi } from 'vitest'
|
|
|
|
// Mock electron module globally
|
|
vi.mock('electron', () => ({
|
|
app: {
|
|
getPath: vi.fn().mockReturnValue('/mock/user/data')
|
|
}
|
|
}))
|
|
|
|
// Mock electron-log/main
|
|
vi.mock('electron-log/main', () => ({
|
|
default: {
|
|
initialize: vi.fn(),
|
|
transports: {
|
|
file: { level: false },
|
|
console: { level: 'debug' }
|
|
},
|
|
errorHandler: {
|
|
startCatching: vi.fn()
|
|
},
|
|
info: vi.fn(),
|
|
warn: vi.fn(),
|
|
error: vi.fn(),
|
|
debug: vi.fn()
|
|
}
|
|
}))
|
|
|
|
// Mock @electron-toolkit/utils
|
|
vi.mock('@electron-toolkit/utils', () => ({
|
|
is: {
|
|
dev: true
|
|
}
|
|
}))
|