Phase 7~8 구현: 테스트 + 빌드 + CI/CD + SoundEffect + AutoLaunch + UI 리디자인
- vitest 41개 단위 테스트 (HistoryService, DictionaryService, CustomInstructionService, VoiceModeService, D3ROError) - electron-builder.yml (NSIS, asarUnpack, extraResources) - .gitlab-ci.yml (lint, typecheck, test, build, release) - SoundEffectService: WAV 프리로드 + PowerShell 재생 + VoiceMode 연동 - AutoLaunchService: app.setLoginItemSettings + ConfigService 동기화 - TextInsertService: 간이 삽입 검증 (EditMonitor 경량) - 번들링 인프라: SoX 다운로드 스크립트, PyInstaller 빌드, 경로 해상도 유틸 - AudioCaptureService/LocalSTTService: 번들 경로 자동 감지 - 08-design-system.md 기반 MUI 테마 (다크+라이트+auto 테마 시스템) - 전체 UI 컴포넌트 리디자인: AppLayout, Dashboard, StatusBar, History, Dictionary, Commands, Settings - 효과음 WAV 생성: recording-start, recording-stop, error - EPIPE 에러 핸들링 추가
This commit is contained in:
parent
ed5541f769
commit
3f4d0c5828
40 changed files with 6034 additions and 580 deletions
61
tests/setup.ts
Normal file
61
tests/setup.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// tests/setup.ts
|
||||
// vitest 글로벌 셋업: electron 모듈 모킹
|
||||
|
||||
import { vi } from 'vitest'
|
||||
|
||||
// electron 모듈 모킹 — 테스트에서 electron import 시 에러 방지
|
||||
vi.mock('electron', () => ({
|
||||
app: {
|
||||
getPath: vi.fn(() => ':memory:'),
|
||||
getVersion: vi.fn(() => '1.0.0'),
|
||||
quit: vi.fn(),
|
||||
on: vi.fn(),
|
||||
whenReady: vi.fn(() => Promise.resolve())
|
||||
},
|
||||
ipcMain: {
|
||||
handle: vi.fn(),
|
||||
on: vi.fn(),
|
||||
removeHandler: vi.fn()
|
||||
},
|
||||
BrowserWindow: vi.fn(),
|
||||
Tray: vi.fn(),
|
||||
Menu: vi.fn(),
|
||||
nativeImage: {
|
||||
createFromPath: vi.fn()
|
||||
},
|
||||
dialog: {
|
||||
showErrorBox: vi.fn()
|
||||
},
|
||||
screen: {
|
||||
getPrimaryDisplay: vi.fn(() => ({
|
||||
workArea: { x: 0, y: 0, width: 1920, height: 1080 }
|
||||
}))
|
||||
},
|
||||
clipboard: {
|
||||
readText: vi.fn(() => ''),
|
||||
writeText: vi.fn(),
|
||||
readHTML: vi.fn(() => ''),
|
||||
readRTF: vi.fn(() => ''),
|
||||
readImage: vi.fn(() => ({ isEmpty: () => true, toPNG: () => Buffer.alloc(0) })),
|
||||
write: vi.fn()
|
||||
}
|
||||
}))
|
||||
|
||||
// electron-log 모킹
|
||||
vi.mock('electron-log', () => {
|
||||
const noop = vi.fn()
|
||||
return {
|
||||
default: {
|
||||
info: noop,
|
||||
warn: noop,
|
||||
error: noop,
|
||||
debug: noop,
|
||||
create: () => ({
|
||||
info: noop,
|
||||
warn: noop,
|
||||
error: noop,
|
||||
debug: noop
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue