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
Your test must execute an operation that exactly matches a mock's shape and variables to receive the associated mocked response.
This is not very good DX, it would be better if you could use wildcards for requests or at the very least allow request to be use a predicate function that returns true/false depending on whether the incoming request should return a specific mocked response. It's a fairly common use case to just want to return a mocked query response for any kind of variables.
The text was updated successfully, but these errors were encountered:
We have merged the ability to dynamically match variables and I believe this will get you what you're looking for with your request.
This feature will be available starting with our next minor release v3.9.0. If you're interested in trying this out, this is available now in prerelease version v3.9.0-alpha.0 or later.
I'm going to go ahead and close this issue as completed. If the variablesMatcher doesn't address your needs, feel free to add a comment and I'll reopen this issue. Thanks for the request!
As per the docs:
This is not very good DX, it would be better if you could use wildcards for requests or at the very least allow
request
to be use a predicate function that returns true/false depending on whether the incoming request should return a specific mocked response. It's a fairly common use case to just want to return a mocked query response for any kind of variables.The text was updated successfully, but these errors were encountered: