Modify AxiosStrategy to allow for some testing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user