Skip to content

Commit d39d140

Browse files
committed
Fixed broken test suite
1 parent 159c750 commit d39d140

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/namespace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ SocketNamespace.prototype.$emit = EventEmitter.prototype.emit;
4949

5050
SocketNamespace.prototype.clients = function (room) {
5151
var room = this.name + (room !== undefined ?
52-
(this.name !== '' ? '/' : '') + room : '');
52+
'/' + room : '');
5353

5454
if (!this.manager.rooms[room]) {
5555
return [];

lib/socket.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Socket.prototype.onDisconnect = function (reason) {
162162

163163
Socket.prototype.join = function (name, fn) {
164164
var nsp = this.namespace.name
165-
, name = (nsp === '' ? '' : (nsp + '/')) + name;
165+
, name = (nsp + '/') + name;
166166

167167
this.manager.onJoin(this.id, name);
168168
this.manager.store.publish('join', this.id, name);
@@ -183,7 +183,7 @@ Socket.prototype.join = function (name, fn) {
183183

184184
Socket.prototype.leave = function (name, fn) {
185185
var nsp = this.namespace.name
186-
, name = (nsp === '' ? '' : (nsp + '/')) + name;
186+
, name = (nsp + '/') + name;
187187

188188
this.manager.onLeave(this.id, name);
189189
this.manager.store.publish('leave', this.id, name);

test/transports.websocket.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var sio = require('socket.io')
1313
, should = require('./common')
1414
, parser = sio.parser
15-
, ports = 15400;
15+
, ports = 225400;
1616

1717
/**
1818
* Tests.

0 commit comments

Comments
 (0)