How can I mock an RTKQ query with streaming updates inside a Cypress unit test? #1442
Unanswered
silviubogan
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I'm using https://www.npmjs.com/package/mock-socket in my updates to the Redux Essentials tutorial example app - perhaps that would work here? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
How can I mock an RTKQ query with streaming updates from an Socket.IO server inside a Cypress unit test? I would use the mock to test a React component that uses the query.
I tried
cy.intercept
but don't know how to use it with web sockets.What is the good practice in this situation? Please advice.
I am currently looking into this, but I am not sure this is what I want because the Socket.IO client already exists in my web page.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions