Learning JavaScript with QUnit
11 Sep 2016QUnit is a JavaScript unit testing framework that makes it easy to start learning good unit testing practices while learning JavaScript.
The Assignment
View the assignment.
Try the assignment locally
Fork or clone the repository at https://bitbucket.org/professorcase/m03. Look for the “Clone in Sourcetree” icon to the left of the HTTPS dropdown in the upper left corner of the repository main page.
In your local copy of the M03 folder, double-click on M03.html to open it in your browser.
Quick look at QUnit
Review the initial test results.
Make the changes described, adding in the two extra test cases, and then write the JavaScript code to implement the new methods and make the new tests all pass successfully.
Working with the code
Use a simple text editor, e.g., Notepad++ to modify the files.
Or use a light-weight integrated development environment like Visual Studio Code.
Right-click on your local M03 folder and click “Open with Code”.
(If you don’t see this option, reinstall Visual Studio code and check the option to add this to your context menu in Windows.)
Unit testing
There are many unit test options for front-end code. QUnit requires only JavaScript, making it a great way to get started.