Questions tagged [axios-mock-adapter]
62 questions
0
votes
2 answers
Use axios and axios-mock-adapter
I'm trying to use axios and axios-mock-adapter in one place to aggregate more mocks and then export the axios instance to use it wherever I want:
mock.js
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
let instance =…
![](../../users/profiles/678833.webp)
Piero
- 8,533
- 18
- 82
- 153
0
votes
2 answers
React-Redux app testing action creator containing axios GET call
I am writing a react-redux app and in one of my action creators I am making an api request via axios
Roughly, it looks something like this:
import axios from 'axios'
export function getStoredData(userInput) {
.
.
.
var url =…
![](../../users/profiles/3807714.webp)
Meticulous
- 115
- 1
- 9