Created
December 7, 2013 20:29
-
-
Save cciollaro/7848272 to your computer and use it in GitHub Desktop.
AVM testing structure
This file contains 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
let's imagine you wanted to test Coin.js | |
1.) create test/coinTest.js | |
2.) write tests like these: http://pivotal.github.io/jasmine/. Jasmine is a really great library, go check out that page! :) | |
3.) when you've written your test, go to SpecRunner.html and include your test and dependencies like so: | |
<!-- include source files here... --> | |
<script type="text/javascript" src="js/Coin.js"></script> | |
<!-- include spec files here... --> | |
<script type="text/javascript" src="test/coinTest.js"></script> | |
4.) open up SpecRunner.html in your browser | |
5.) get tests passing :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment