-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
MockedResponse variableMatcher shows warning about no more mocked responses for the query #11935
Comments
Hey @jci-aws 👋 It looks like you're configuring const mocks = [
{
request: {
query: GET_DOG_QUERY,
},
variableMatcher: () => true,
result: {
data: {
dog: { id: "1", name: "Buck", breed: "bulldog" },
},
},
},
]; It looks like your test passes in the sandbox because you're only checking the Hope this helps! |
Thought I was going crazy. Thanks! |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
No problem! Sometimes an outside perspective is all thats needed 😆. Glad its working for you! Have a great day. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue Description
When testing with
MockedProvider
, I have provided avariableMatcher
to one of myMockedResponse
s. When running the test, the tests still pass but there is a console warning about the queries not matching:Since this test query is being matched through
variableMatcher
, I would not expect this warning to appear.Link to Reproduction
https://codesandbox.io/s/sharp-butterfly-fkxn55?file=/src/dog.test.js:258-292
Reproduction Steps
Run tests in CodeSandbox, see warning message in console tab.
@apollo/client
version3.10.8
The text was updated successfully, but these errors were encountered: