expect = require("chai").expect

describe('SampleTestCase', function(){
    describe('truthyMethod()', function(){
        it('should be true when obvious true comparison is used', function(){
            expect(null == undefined).to.be.true;
        })
    })
});
@@ -1,14 +1,18 @@
-expect
+var engine
  = requi
@@ -18,47 +18,69 @@
 ire(
-%22chai%22).expect%0A%0Adescribe('SampleTestCas
+'../chat/engine');%0Arequire(%22chai%22).should()%0A%0A%0Adescribe('Engin
 e', 
@@ -87,24 +87,25 @@
 function()%7B%0A
+%0A
     describe
@@ -110,20 +110,18 @@
 be('
-truthyMethod
+countVotes
 ()',
@@ -156,115 +156,811 @@
 uld 
-be true when obvious true comparison is used', function()%7B%0A            expect(null == undefined).to.be.true
+return 1 vote for single option', function()%7B%0A            var userVotes = %7B%22user%22: %7Banswer: %22A%22%7D%7D;%0A            var result = engine.countVotes(userVotes);%0A            result.should.have.property(%22A%22).equals(1);%0A        %7D);%0A%0A        it('should return 2 votes for single option', function()%7B%0A            var userVotes = %7B%22user%22: %7Banswer: %22A%22%7D, %22otherUser%22: %7Banswer: %22A%22%7D%7D;%0A            var result = engine.countVotes(userVotes);%0A            result.should.have.property(%22A%22).equals(2);%0A        %7D);%0A%0A        it('should return 1 vote for each option', function()%7B%0A            var userVotes = %7B%22user%22: %7Banswer: %22A%22%7D, %22otherUser%22: %7Banswer: %22B%22%7D%7D;%0A            var result = engine.countVotes(userVotes);%0A            result.should.have.property(%22A%22).equals(1);%0A            result.should.have.property(%22B%22).equals(1)
 ;%0A  
@@ -971,15 +971,19 @@
   %7D)
+;%0A
 %0A    %7D)
+;%0A
 %0A%7D);

test for poll votes counting