mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-28 22:53:11 +08:00
- Updated vitest.config.ts to handle optional chaining for plugins and alias. - Added setup.ts for mocking electron-log in renderer tests. - Adjusted test include and exclude patterns to refine test coverage.
21 lines
375 B
TypeScript
21 lines
375 B
TypeScript
import { vi } from 'vitest'
|
|
|
|
vi.mock('electron-log/renderer', () => {
|
|
return {
|
|
default: {
|
|
info: console.log,
|
|
error: console.error,
|
|
warn: console.warn,
|
|
debug: console.debug,
|
|
verbose: console.log,
|
|
silly: console.log,
|
|
log: console.log,
|
|
transports: {
|
|
console: {
|
|
level: 'info'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|