-
Notifications
You must be signed in to change notification settings - Fork 248
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
onGet params doesn't seem to be working #138
Comments
I don't think you need to explicitly add a Have you tried the following ? mock
.onGet('/mock', {address: 'Singapore'})
.reply(200, {...}); |
@fterh Are you still observing this issue? I believe I am running into a similar issue and was wondering if you ever solved yours. |
I believe I'm running into this issue and I'm not convinced it's the same as #116. The suggestion on #116 seems to be that it's a v8 bug but the issue I'm running into seems to be that the url matching is not working correctly in this line: return (isUrlMatching(url, handler[0]) || isUrlMatching(combineUrls(baseURL, url), handler[0])) && isBodyOrParametersMatching(method, body, parameters, handler[1]) && isRequestHeadersMatching(headers, handler[2]); That line fails before it even has a chance to match parameters, because For example, I think |
Ahh, okay I figured out my problem. I think this is likely @fterh's problem as well. I did not realize For example... mock
.onGet('/mock', {params: {address: 'Singapore'}})
.reply(200, {...});
// This fails
axios.get('/mock?address=Singapore')
// This works
axios.get('/mock', { params: {address: 'Singapore'}}) In my opinion, this is a bug in |
Can create scheduled sessions and get scheduled sessions for a recipient. API helper now takes query params as a separate argument instead of including it in the URL path, as it was causing issues with tests: ctimmerm/axios-mock-adapter#138
This works:
But this returns
Request failed with status code 404
:The text was updated successfully, but these errors were encountered: