mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 15:10:56 +08:00
test(api): fix cancellation error fixture (#677)
This commit is contained in:
@@ -182,8 +182,8 @@ describe('MoviePilot API client', () => {
|
||||
|
||||
it('取消请求保持原始 CanceledError,且不提示或触发离线探测', async () => {
|
||||
const reportConnectionFailure = vi.fn()
|
||||
const adapter: AxiosAdapter = async config => {
|
||||
throw new CanceledError('Request cancelled', config)
|
||||
const adapter: AxiosAdapter = async () => {
|
||||
throw new CanceledError('Request cancelled')
|
||||
}
|
||||
const { api } = createApiClients({ adapter, hooks: { reportConnectionFailure }, notifier })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user