-
-
Notifications
You must be signed in to change notification settings - Fork 581
Open
Labels
DXneeds:discussionscope:browserRelated to MSW running in a browserRelated to MSW running in a browser
Description
Prerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn't contain the answer to my issue
Environment check
- I'm using the latest
mswversion - I'm using Node.js version 20 or higher
Browsers
Chromium (Chrome, Brave, etc.)
Reproduction repository
https://github.com/GeorgeLung/msw-vitest-ws-example
Reproduction steps
npm test
Current behavior
For each file, of the two tests only the first passes. The second times out. This is because both of the promises (waiting on a websocket connection) don't resolve.
Expected behavior
All 4 tests to pass.
It's likely the pattern I'm attempting is the issue. In which case, I'd be grateful if the docs could be updated to demonstrate the correct pattern.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DXneeds:discussionscope:browserRelated to MSW running in a browserRelated to MSW running in a browser