Created
May 28, 2012 19:48
-
-
Save sole/2820890 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Car = function() { | |
this.beep = function() { | |
return 'beep'; | |
} | |
this.honk = function() { | |
return 'honk'; | |
} | |
return this; | |
}, | |
car = new Car(); | |
var carTest = new MUNIT.Test([ | |
function beepDoesBeep() { | |
this.assertTrue(car.beep() == 'beep'); | |
}, | |
function beepBarks() { | |
this.assertTrue(car.beep() == 'woof'); | |
}, | |
function aHonkIsAHonkIsAHonk() { | |
this.assertEquals(car.honk(), 'honk'); | |
} | |
]); | |
var results = carTest.runTests(); | |
document.body.appendChild(MUNIT.prettyFormat(results)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment