diff --git a/lib/router.js b/lib/router.js index 03a325c..8284397 100644 --- a/lib/router.js +++ b/lib/router.js @@ -357,5 +357,5 @@ function Socket (sock) { this.emit = function() { debug('debug wrapped'); return sock.emit.apply(sock, slice.call(arguments)); - } + }; } diff --git a/spec/lib/router-spec.coffee b/spec/lib/router-spec.coffee index fa57787..aa7140e 100644 --- a/spec/lib/router-spec.coffee +++ b/spec/lib/router-spec.coffee @@ -36,7 +36,7 @@ describe 'Router', -> When -> @router.onEvent.call @socket, @packet Then -> expect(@socket.ack).toHaveBeenCalledWith @packet.id And -> expect(@router.onRoute).toHaveBeenCalledWith null, jasmine.any(Object), ['message', 'hello', @fn] - #And -> expect(@router.onRoute.mostRecentCall.args[1].sock).toBe @socket + And -> expect(@router.onRoute.mostRecentCall.args[1].__proto__).toBe @socket describe '#onRoute (err:Error=null, sock:Object, args:Array)', ->