Your morning challenge is to make the tests pass, and then to write a couple tests. Test framework being used is Q-Unit.
The assertions that are being used in the test can be found here: http://api.qunitjs.com/category/assert/
Instructions:
-
Clone this repo
-
Take a quick look at test.html, notice the script tags
-
Open the test.html file in the browser, you should see the first test fail
-
Now open test.js - this file holds some tests and some functions
-
Locate the firstTest function and the first test
-
Change the firstTest function to make the corresponding test pass.
-
Save and refresh the browser to see it pass
-
Complete for the rest of the tests
-
Write tests for the last two functions