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

Moxios not working in 0.19.1 #2650

Closed
medeirosle opened this issue Jan 9, 2020 · 10 comments
Closed

Moxios not working in 0.19.1 #2650

medeirosle opened this issue Jan 9, 2020 · 10 comments

Comments

@medeirosle
Copy link

medeirosle commented Jan 9, 2020

Moxios last version (0.4.0) just stopped working with Axios 0.19.1.

I just changed back Axios version in my project (0.19.0) and it's working fine.

Any idea why?

@chinesedfan
Copy link
Collaborator

@neomedeiros Can you provide detailed code examples or error messages, as the issue template required?

@DanielRuf
Copy link

axios/moxios#71

v0.19.0...v0.19.1

Maybe you can find the culprit with git bisect by cloning axios into your node_modules or using axios/axios.

@medeirosle
Copy link
Author

medeirosle commented Jan 13, 2020

I've got no error message in my real-world project, the stubRequest() function simply did not stub a given request. I've just tried to create a minimal project in order to reproduce the error, but without success. Everything is working fine:

https://github.com/neomedeiros/axios-2650

I will try to get more details about the issue in the real-world project.

@brandon-leapyear
Copy link

brandon-leapyear commented Feb 16, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


@neomedeiros I think the issue is if you change todos.js in your repro project to use

axios.get('/todos', { baseURL: 'https://...' })

I'm finding that if I do stubRequest with just the path instead of the full path, it works

@brandon-leapyear
Copy link

brandon-leapyear commented Feb 16, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


It broke here: https://github.com/brandon-leapyear/axios/commit/6fe506fda290ba935c2641f68f1fcba7f4a16cd3

Will try to put up a PR soon

@github-actions
Copy link
Contributor

Hello! 👋

This issue is being automatically marked as stale because it has not been updated in a while. Please confirm that the issue is still present and reproducible. If no updates or new comments are received the issue will be closed in a few days.

Thanks.

@brandon-leapyear
Copy link

brandon-leapyear commented Jun 29, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


this issue still has open PRs against it

@chinesedfan
Copy link
Collaborator

@brandon-leapyear See #2751 (comment). Can you check for that?

@github-actions
Copy link
Contributor

Hello! 👋

This issue is being automatically marked as stale because it has not been updated in a while. Please confirm that the issue is still present and reproducible. If no updates or new comments are received the issue will be closed in a few days.

Thanks.

@fraywing
Copy link

@brandon-leapyear @chinesedfan have you all not achieved consensus on a fix for this?

woyuen added a commit to stelace/stelace.js that referenced this issue Feb 18, 2021
- remove moxios which doesn't work anymore since axios@>=0.19.1
(axios/axios#2650)

- replace it with axios-mock-adapter
(https://github.com/ctimmerm/axios-mock-adapter)
woyuen added a commit to stelace/stelace.js that referenced this issue Feb 18, 2021
* chore(deps): bump axios from 0.19.0 to 0.21.1

Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](axios/axios@v0.19.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

* chore: adapt failing tests due to axios bump

- remove moxios which doesn't work anymore since axios@>=0.19.1
(axios/axios#2650)

- replace it with axios-mock-adapter
(https://github.com/ctimmerm/axios-mock-adapter)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: woyuen <wing-on@stelace.com>
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

Successfully merging a pull request may close this issue.

6 participants