Skip to content

Commit cf25954

Browse files
committed
[minor] Fix nit in error message
Closes #2276
1 parent b92745a commit cf25954

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/websocket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ function initAsClient(websocket, address, protocols, options) {
708708
if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {
709709
invalidUrlMessage =
710710
'The URL\'s protocol must be one of "ws:", "wss:", ' +
711-
'"http:", "https", or "ws+unix:"';
711+
'"http:", "https:", or "ws+unix:"';
712712
} else if (isIpcUrl && !parsedUrl.pathname) {
713713
invalidUrlMessage = "The URL's pathname is empty";
714714
} else if (parsedUrl.hash) {

test/websocket.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('WebSocket', () => {
5252
assert.strictEqual(
5353
err.message,
5454
'The URL\'s protocol must be one of "ws:", "wss:", ' +
55-
'"http:", "https", or "ws+unix:"'
55+
'"http:", "https:", or "ws+unix:"'
5656
);
5757

5858
return true;
@@ -1515,7 +1515,7 @@ describe('WebSocket', () => {
15151515
assert.strictEqual(
15161516
err.message,
15171517
'The URL\'s protocol must be one of "ws:", "wss:", ' +
1518-
'"http:", "https", or "ws+unix:"'
1518+
'"http:", "https:", or "ws+unix:"'
15191519
);
15201520
assert.strictEqual(ws._redirects, 1);
15211521

0 commit comments

Comments
 (0)