assert.throws(function(){ chatConnection.outputWhisper("Chat message", "target"); });
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":"******"})); })