chore: 打包配置 测试用例

This commit is contained in:
电摇小子
2026-09-29 13:06:00 +07:00
parent 0abbda1160
commit 5276bce060
18 changed files with 621 additions and 160 deletions
+4 -1
View File
@@ -118,8 +118,11 @@ describe('preload IPC contract', () => {
createTime: 1785553200,
svrId: 'server-11'
}
// preload 把 options 一路透传(不传即显式 undefined),主进程签名是 (reference, options?)。
await api.recognizeVoice(voiceReference)
expect(invoke).toHaveBeenLastCalledWith('voice:recognize', voiceReference)
expect(invoke).toHaveBeenLastCalledWith('voice:recognize', voiceReference, undefined)
await api.recognizeVoice(voiceReference, { force: true })
expect(invoke).toHaveBeenLastCalledWith('voice:recognize', voiceReference, { force: true })
await api.cancelVoiceRecognition(voiceReference)
expect(invoke).toHaveBeenLastCalledWith('voice:cancelRecognition', voiceReference)
await api.downloadVoiceModel()