You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
Currently the order of the mocks must match the order of the HTTP requests. However some applications will have a non-deterministic order of HTTP requests. We could support these apps by:
Support providing a callback to match an HTTP request to a mock
Support matching HTTP to a mock by URL, ignoring order (could be configurable).
Would be great to get feedback on usage before making a decision.
The text was updated successfully, but these errors were encountered:
@ianwsperber The request to match by URL is pretty straightforward to implement. And I think the use-case that supports is:
I have a server that makes calls A, B, C. The order of B, C calls is non-deterministic.
I want to run save to capture mocks to disk. I want to run load to restore mocks from disk.
I don't want my tests to fail if the order of B and C tests fail
However using the matching...respond feature one could inline the mocks for B and C. They wouldn't get the benefit of easily saving and loading B and C calls but that would work too.
Any thoughts on if matching...respond will meet the need or is the use case more along the lines of save...load mocks?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently the order of the mocks must match the order of the HTTP requests. However some applications will have a non-deterministic order of HTTP requests. We could support these apps by:
Would be great to get feedback on usage before making a decision.
The text was updated successfully, but these errors were encountered: