it('Should register the callback on the proper event', function(){ var callback = function(data){}; chatConnection.connect(); chatConnection.onSystemGreeting(callback); assert.equal(onStub.callCount, 1); assert(onStub.calledWith(constants.SYSTEM_GREETING, callback)); })
assert.throws(function(){ chatConnection.onSystemGreeting(function(data){}); });