Skip to content

Commit 01c61ff

Browse files
authored
Merge pull request #188 from share/add-connection-tests
Add state management tests for connection
2 parents d64b202 + 9b7b3de commit 01c61ff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/client/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Connection.prototype.bindToSocket = function(socket) {
8888

8989
this.socket = socket;
9090

91-
// State of the connection. The correspoding events are emmited when this changes
91+
// State of the connection. The corresponding events are emitted when this changes
9292
//
9393
// - 'connecting' The connection is still being established, or we are still
9494
// waiting on the server to send us the initialization message

test/client/connection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ describe('client connection', function() {
9292
});
9393

9494
describe('state management using setSocket', function() {
95+
9596
it('initial connection.state is connecting, if socket.readyState is CONNECTING', function () {
9697
// https://html.spec.whatwg.org/multipage/web-sockets.html#dom-websocket-connecting
9798
var socket = {readyState: 0};

0 commit comments

Comments
 (0)