Modify AxiosStrategy to allow for some testing

This commit is contained in:
Andrew Bastin
2020-08-21 23:10:45 -04:00
parent ed5d9132d3
commit c2ec7be719

View File

@@ -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