forked from vitest-dev/vitest
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(useWebSocket): Added support for optional protocols (vitest-dev#705
) * feat(useWebSocket): ✨ Added support for optional protocols parameter Added support for an optional array parameter called protocols. This second parameter to the WebSocket constructor contains one or more protocol string to use e.g. subprotocols. If not provided, internally the parameter always default to an empty array (`[]`), so that was chosen as parameter initializer. More information can be found (here)[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket]. * refactor(useWebSockets): Moved protocols option to WebSocketOptions
- Loading branch information
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters