I want to mock the Axios API in react-native and use axios-mock-adapter
to mock the API. Below is the code.
const axiosMock = new MockAdapter(axios);
console.log("axiosMock ==>", axiosMock);
But when I run the test the axiosMock
gives me a promise and I cannot mock the API
console.log
axiosMock ==> Promise { _x: 0, _y: 0, _z: null, _A: null }
Can anyone help me to solve this issue?