I was using apollo-testing-library for writing integration tests, It allows me to mutate and query but not subscribe and test. My question is, does anyone have any techniques they have used or know a way to mock a subscription using Jest?
I'm definitely late to the party, and this is not a clear answer. But going through the same hurdle myself I thought someone could find this useful.
My solution ended up being an End-to-End test of subscriptions.
Meaning I:
I've written a sample gist here:
https://gist.github.com/patrixr/2536ee396d488bd5e38b0278513eefeb