Top "Axios-mock-adapter" questions

Axios catch error Request failed with status code 404

I'm testing a login component that uses Axios. I tried mocking Axios with axios-mock-adapter, but when I run the tests, …

unit-testing vue.js jestjs axios axios-mock-adapter
Why does my mock of my api return a 404 error?

I use axios-mock-adapter to mock my API, it works correctly but on one mock it returns a 404 error and I …

reactjs jestjs axios enzyme axios-mock-adapter
Why TypeError: axios.create is not a function? When testing axios GET

I'm trying to test my axios API functions in React. Found this question here: how do i test axios in …

unit-testing testing axios axios-mock-adapter
Write test axios-mock-adapter with axios.create()

I want to test my http service but get error. So, my test file api.js import axios from 'axios'; …

axios jestjs axios-mock-adapter
Mock axios with axios-mock-adapter get undefined resp

I created an axios instance ... // api/index.js const api = axios.create({ baseURL: '/api/', timeout: 2500, headers: { Accept: 'application/…

unit-testing axios jestjs axios-mock-adapter
How do you verify that a request was made with axios-mock-adapter?

I am using https://github.com/ctimmerm/axios-mock-adapter I would like to know how can I verify that an endpoint …

unit-testing axios axios-mock-adapter
Mock api calls from Storybook

Does axios-mock-adapter only work on requests made with axios? I have written a component that POSTs to an API (using …

reactjs mocking axios storybook axios-mock-adapter