.onAny() not working as expected
See original GitHub issueI have my mocks set up like to:
mock
.onGet('/foo').reply(200)
.onAny().reply(500);
However, when I make a request to /bar, a 404 code is returned instead of my specified 500. Changing this to .onAny('/bar') or .onAny(/.*/) works as expected.
I am using axios v0.14.0 and axios-mock-adapter v1.6.1.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Response for "onAny().passthrough()" always returns ... - GitHub
onAny().passThrough(). The mocked (/mocked) endpoint works as expected, but I never get any response data back for any of the real API ...
Read more >Regex replace not working as intended on any browser ...
I'm trying to create a function which adds a styled span element around a regex match to create text highlighting within a code...
Read more >Best practices for writing unit tests - .NET - Microsoft Learn
When you have a suite of well-named unit tests, each test should be able to clearly explain the expected output for a given...
Read more >If an app on your iPhone or iPad stops responding, closes ...
Then open the app to see if it's working as expected. Check for updates. To see if updates are available for the app,...
Read more >Promise.reject() - JavaScript - MDN Web Docs
The Promise.reject() method returns a Promise object that is rejected with a ... Report problems with this compatibility data on GitHub ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

OK, thanks for the explanation, now I get it. I’ll fix it
Yeah, the feature was included with some other, larger changes. I’ll update the release notes to mention it.