This is code I wrote to get a better handle on unit testing with QUnit. I had an epiphany that learning unit testing required learning functional programming first.
You can read the blog post/tutorial for all this here. The build-complete
folder has the final code but you can use the code in the build
folder to add code and follow along if you like.
To do this, make sure you have the most-recent version of Node/npm globally installed on your machine. From there:
- Clone the repo.
- Do an
npm install
. - Type
npm start
in the terminal.
Then go to http://localhost:3000
: you should a blank page with only a link to the test suite. As you update code from the tutorial in the build
folder, you will see changes.