Comparing version 0.5.1 to 0.5.2
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"engines": { | ||
@@ -13,0 +13,0 @@ "node": ">= 0.8.x < 0.9.0" |
@@ -267,3 +267,3 @@ var debug = require('debug')('chat-room'), | ||
return { | ||
cid: conn.state.id, | ||
id: conn.state.id, | ||
user: conn.state.user | ||
@@ -270,0 +270,0 @@ }; |
@@ -48,3 +48,4 @@ var assert = require('assert'), | ||
var nick = randomName().replace(/\s/g, ''), | ||
client3 = chat.client(room.connect(), { nick: nick }); | ||
client3 = chat.client(room.connect(), { nick: nick }), | ||
ids; | ||
@@ -57,2 +58,11 @@ client3.once('data', function(msg) { | ||
// extract the ids from the connections | ||
ids = msg.meta.connections.map(function(conn) { | ||
return conn.id; | ||
}); | ||
// ensure client 1 is found | ||
assert(ids.indexOf(client.cid) >= 0, 'Could not find client 1 in list of connections'); | ||
assert(ids.indexOf(client3.cid) >= 0, 'Could not find client 3 in list of connections'); | ||
done(); | ||
@@ -59,0 +69,0 @@ }); |
32564
798