refs #714 Fix tests for axiosCancelToken
This commit is contained in:
parent
e2518d5af4
commit
d047c7242b
|
@ -116,7 +116,13 @@ const toot: MastodonEntity.Notification = {
|
|||
|
||||
;(axios.CancelToken.source as any).mockImplementation(() => {
|
||||
return {
|
||||
token: 'cancelToken'
|
||||
token: {
|
||||
throwIfRequested: () => {},
|
||||
promise: {
|
||||
then: () => {},
|
||||
catch: () => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -63,7 +63,13 @@ const status: Entity.Status = {
|
|||
}
|
||||
;(axios.CancelToken.source as any).mockImplementation(() => {
|
||||
return {
|
||||
token: 'cancelToken'
|
||||
token: {
|
||||
throwIfRequested: () => {},
|
||||
promise: {
|
||||
then: () => {},
|
||||
catch: () => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -123,7 +123,13 @@ const groupInvited: MisskeyEntity.Notification = {
|
|||
|
||||
;(axios.CancelToken.source as any).mockImplementation(() => {
|
||||
return {
|
||||
token: 'cancelToken'
|
||||
token: {
|
||||
throwIfRequested: () => {},
|
||||
promise: {
|
||||
then: () => {},
|
||||
catch: () => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -121,7 +121,13 @@ const followRequest: PleromaEntity.Notification = {
|
|||
|
||||
;(axios.CancelToken.source as any).mockImplementation(() => {
|
||||
return {
|
||||
token: 'cancelToken'
|
||||
token: {
|
||||
throwIfRequested: () => {},
|
||||
promise: {
|
||||
then: () => {},
|
||||
catch: () => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue