Example #1
0
 assert.throws(function(){
     chatConnection.outputWhisper("Chat message", "target");
 });
Example #2
0
 it('Should send an event containing the message and target', function(){
     chatConnection.connect();
     chatConnection.outputWhisper("Chat message", "target");
     assert.equal(emitStub.callCount, 1);
     assert(emitStub.calledWith(constants.WHISPER_SENT, {"message":"Chat message", "username":"******"}));
 })