You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Silencing the warning in this case should be OK because it resolves to a constant string without any outside interaction—it does not feel good though; one might be tempted to silence it globally and then real issues will be not reported.
What would you like?
I am trying to write Cypress tests for React Router v7—it uses turbo-stream under the hood.
I would like
cy.intercept
to accept a ReadableStream as its response.For reference a simple JSON response:
As I see it, I have the following options:
A)
Capture a response from the backend or construct it manually:
This is error prone and brittle.
B) Introduce a helper method and silence the
await
warning:Silencing the warning in this case should be OK because it resolves to a constant string without any outside interaction—it does not feel good though; one might be tempted to silence it globally and then real issues will be not reported.
C) Use cy.task():
cypress.config.js
This is convoluted and does not scale well: What if you need more than one body in a single test?
Ideally, I would like to write (in order of preference):
or
or
Why is this needed?
The alternatives are clunky, error prone, or lead to unnecessary code bloat.
Other
jacob-ebey/turbo-stream#58
ReadableStream
The text was updated successfully, but these errors were encountered: