Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Sep 3, 2014
1 parent 7f63bc2 commit eab3077
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ describe('WebSocket', function () {
});

describe('#close', function () {
it('should send and receive message', function () {
it('should close the socket', function (done) {
ws.connect({url: 'ws://echo.websocket.org'});
ws.close();
expect(ws.getReadyState()).to.equal(3);
ws.on('close', function () {
expect(ws.getReadyState()).to.equal(3);
done();
});
});
});
});
Expand Down

0 comments on commit eab3077

Please sign in to comment.