Matt Thompson
Mocking tRPC call w/ Playwright (Transform Error)
Worked 🙂
End Result for me:
In this case I don't really care about the return - I simply want it to keep going
But you could mock out the full return under data.json here.
The way the tests run, I shouldn't have more than one for
batch
18 replies
Mocking tRPC call w/ Playwright (Transform Error)
Ah, Yea
For the most part we are doing that with Factories, etc.
This call has a 3rd party call where I don't have a Sandbox to run against.
I was originally looking for the equiv of
Jest.mock
in Playwright E2E
The closest thing they support is Network mocking
Sadly the 3rd party call couldn't be mocked in this scenario as the tRPC call is calling it within
Fun edge case I guess.
I'm looking at the real result like you mentioned above and trying to mock the array.
I didn't take that into account earlier. 🤞18 replies