Ejemplo n.º 1
0
        it('Should register the callback on the proper event', function(){
            var callback = function(data){};

            chatConnection.connect();
            chatConnection.onWhisperReceived(callback);

            assert.equal(onStub.callCount, 1);
            assert(onStub.calledWith(constants.WHISPER_RECEIVED, callback));
        })
Ejemplo n.º 2
0
 assert.throws(function(){
     chatConnection.onWhisperReceived(function(data){});
 });