Is it possible to mock `refetch`?
Hello! I'm writing a jest test which is attempting to ensure that refetch is called after a mutation occurs. I'm using a MockedProvider, and am mocking the initial query and the mutation, however I need to ensure that refetch is called. In vain I tried something like the…
How to test queries which require an authorization token?
Apollo Server Integration testing documentation shows how to test simple queries using createTestClient. If you have a query which requires an authorization token to be run, how do you pass such a token to the query so that can be tested with the above mentioned…
apollo-datasource-rest + Typescript + Jest
I am setting up a new project using Apollo, TypeScript & Jest and I'm running into some difficulty testing my datasources that extent RESTDataSource. Jest will not mock the class to be extended & much of the advice I'm coming across recommends switching to composition over…