mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +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 () => {
|
it('取消请求保持原始 CanceledError,且不提示或触发离线探测', async () => {
|
||||||
const reportConnectionFailure = vi.fn()
|
const reportConnectionFailure = vi.fn()
|
||||||
const adapter: AxiosAdapter = async config => {
|
const adapter: AxiosAdapter = async () => {
|
||||||
throw new CanceledError('Request cancelled', config)
|
throw new CanceledError('Request cancelled')
|
||||||
}
|
}
|
||||||
const { api } = createApiClients({ adapter, hooks: { reportConnectionFailure }, notifier })
|
const { api } = createApiClients({ adapter, hooks: { reportConnectionFailure }, notifier })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user