Unable to mock unstable_batchStreamLink network response
Hi there! I have a couple API endpoints that call third party dependencies and would like to mock a network response for these calls during my playwright tests. I've been using
batchHttpLink
previously and mocking the following API route worked perfectly:
However when I use unstable_batchStreamLink
this returns an error stating Unexpected non-whitespace character after JSON at position 55
which kinda makes sense because it should be streaming a response back instead of immediately receiving a JSON object. But I'm kind of stumped on how I can update my mock response call to satisfy TRPC to return that streamed data instead?
Anyone have insight on how to handle this? Thanks a lot for your time!0 Replies