Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passThrough cause axios error #57

Open
guanyx opened this issue May 27, 2017 · 0 comments
Open

passThrough cause axios error #57

guanyx opened this issue May 27, 2017 · 0 comments

Comments

@guanyx
Copy link

guanyx commented May 27, 2017

// error code
import Axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
const mock = new MockAdapter(Axios);
// start mock 
mock.onAny().passThrough();
// end mock

Axios.get('/host/path')

error pic

// correct code
import Axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
const mock = new MockAdapter(Axios);
// start mock
mock.onAny().passThrough();
// end mock

const axiosIns = Axios.create();
axiosIns.get('/host/path')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant