-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate URLs when constructing Sarus object
This will better inform a user about invalid URLs when constructing a new Sarus object. It will already give an error during construction instead of the connect step. That way, we won't repeatedly try to connect to the same URL, despite it being invalid the whole time. Add test case in __tests__ for - Completely invalid URL (fails to be fed into new URL()) - Invalid protocol (must be ws / wss) We use stock JS functionality for this, so no custom URL parser.
- Loading branch information
1 parent
2f84d15
commit 15234b9
Showing
3 changed files
with
51 additions
and
2 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
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