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

Documentation wrong about order of Mock matching #116

Closed
mjp4 opened this issue Oct 3, 2024 · 2 comments
Closed

Documentation wrong about order of Mock matching #116

mjp4 opened this issue Oct 3, 2024 · 2 comments

Comments

@mjp4
Copy link

mjp4 commented Oct 3, 2024

From https://httpmock.rs/miscellaneous/faq/

In which order are mocks evaluated?
When the httpmock server receives a request that matches multiple mocks, they are evaluated in reverse order of their definition. This means the most recently defined mock takes precedence and will be used.

This is not correct. As mentioned in #60 (comment) they are matched in order of definition.

If they were indeed matched in reverse order of definition, then that would provide a solution to #94. I think it would be the more intuitive order, but it is not the current behaviour.

@alexliesenfeld
Copy link
Owner

alexliesenfeld commented Nov 9, 2024

Thank you @mjp4 , I‘ll correct the docs.

@alexliesenfeld
Copy link
Owner

Fixed now

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

2 participants