Modify AxiosStrategy to allow for some testing
This commit is contained in:
parent
ed5d9132d3
commit
c2ec7be719
1 changed files with 5 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ const axiosWithoutProxy = async (req, _store) => {
|
|||
try {
|
||||
const res = await axios({
|
||||
...req,
|
||||
cancelToken: cancelSource.token,
|
||||
cancelToken: (cancelSource && cancelSource.token) || "",
|
||||
responseType: "arraybuffer",
|
||||
})
|
||||
|
||||
|
|
@ -67,4 +67,8 @@ const axiosStrategy = (req, store) => {
|
|||
return axiosWithoutProxy(req, store)
|
||||
}
|
||||
|
||||
export const testables = {
|
||||
cancelSource,
|
||||
}
|
||||
|
||||
export default axiosStrategy
|
||||
|
|
|
|||
Loading…
Reference in a new issue