Example #1
0
        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));
        })
Example #2
0
 assert.throws(function(){
     chatConnection.onSystemGreeting(function(data){});
 });