Skip to content

Instantly share code, notes, and snippets.

@cciollaro
Created December 7, 2013 20:29
Show Gist options
  • Save cciollaro/7848272 to your computer and use it in GitHub Desktop.
Save cciollaro/7848272 to your computer and use it in GitHub Desktop.
AVM testing structure
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