I've came across this wall while i was mocking my project.
I make an axios.all request with 10 requests within it. How the hell do i mock it?
I'm currently using moxios to mock my axios http requests but it doesn't seem to have the functionality to deal with this problem.
Example:
axios.all([
axios.get(url1),
axios.get(url2),
axios.get(url3)
])
.then(axios.spread(function (r1, r2, r3) {
...
}))
.catch(err => {
console.error(err, err.stack);
});
Has anyone come accross this problem and have they found a solution?
Update:
I've just mocked each request invidually but it's a slow and painful process, is there a quicker more efficient way to do this?