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 =…
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 =…
1 2 3 4
5