add tests

This commit is contained in:
nkzawa
2017-07-14 12:40:22 +09:00
parent 3d98ed9fe9
commit 2ec4167eb8
4 changed files with 70 additions and 14 deletions

View File

@@ -34,6 +34,10 @@ io.of('/asd').on('connection', function() {
// register namespace
});
io.of('/abc').on('connection', function(socket) {
socket.emit('handshake', socket.handshake);
});
io.of(nsp).on('connection', function(socket) {
socket.send('hello client');
@@ -96,6 +100,10 @@ io.of(nsp).on('connection', function(socket) {
socket.on('error', function() {
console.log('error: ', arguments);
});
socket.on('getHandshake', function(cb) {
cb(socket.handshake);
});
});