INNER CODE UNIT · TypeScript
checkError
microsoft/graphitation · packages/apollo-forest-run/compat/src/core/__tests__/QueryManager/index.ts:2630
const checkError = (error: ApolloError) => {
expect(error.graphQLErrors[0].message).toEqual('This is not the person you are looking for.')
};
handle.subscribe({
error: checkError,
});
handle
.refetch()
.then(() => {
reject(new Error('Error on refetch should reject promise'));
})
.catch(error => {
checkError(error);
})
.then(resolve, reject);
});