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
Apollo's mock link for react is okay for basic testing but needs a lot of improvements, particularly when it comes to dealing with subscriptions. It's also impossible to assert against requests that were made or write mocks that can match requests using arbitrary variables.
wildcard-mock-link is fully compatible but with the following features added:
Match requests with arbitrary variables.
Provide mocks that match more than one request.
Mock subscriptions and send subscription responses after setting up the MockedProvider in a test via method calls.
Grab the mutation/query/subscription requests for use in test assertions.
Can optionally pass act function to it in order to simplify writing tests.
Ability to wait for pending requests to be fulfilled, including recursively dependent requests.
It's also fully tested and documented.
The text was updated successfully, but these errors were encountered:
Apollo's mock link for react is okay for basic testing but needs a lot of improvements, particularly when it comes to dealing with subscriptions. It's also impossible to assert against requests that were made or write mocks that can match requests using arbitrary variables.
wildcard-mock-link is fully compatible but with the following features added:
act
function to it in order to simplify writing tests.It's also fully tested and documented.
The text was updated successfully, but these errors were encountered: