refactor(new merge) (#369)
Co-authored-by: paisley <8197966+su8su@users.noreply.github.com> Co-authored-by: zuolingxuan <zuolingxuan@bytedance.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
e28eba01e1
commit
3d664c017a
@@ -68,6 +68,16 @@ describe('api-client', () => {
|
||||
expect(msg).toContain('Permission denied');
|
||||
});
|
||||
|
||||
it('returns user-facing message for auth invalid error', () => {
|
||||
const msg = toUserMessage(new AppError('AUTH_INVALID', 'Invalid Authentication'));
|
||||
expect(msg).toContain('Authentication failed');
|
||||
});
|
||||
|
||||
it('returns user-facing message for channel unavailable error', () => {
|
||||
const msg = toUserMessage(new AppError('CHANNEL_UNAVAILABLE', 'Invalid IPC channel'));
|
||||
expect(msg).toContain('Service channel unavailable');
|
||||
});
|
||||
|
||||
it('falls back to legacy channel when unified route is unsupported', async () => {
|
||||
const invoke = vi.mocked(window.electron.ipcRenderer.invoke);
|
||||
invoke
|
||||
|
||||
Reference in New Issue
Block a user