The following lesson will introduce you to the basics of unit testing. More importantly, it will show you how to think like a tester.
We will be using Mocha and Chai. Mocha is the test runner; a framework for taking your test code and running the tests automatically. Chai is the assertion library; the syntax that you will use to write your tests.
Chai comes in three flavors: assert, should, and expect. For this lesson we will be using expect; an expressive and super readible style.