The basic premise of test-driven development (TDD) is writing your tests even before you start coding. To make this whole process a lot easier, you can resort to easy-to-use and powerful testing and assertion frameworks, such as Mocha and Chai. Chai is an assertion library that provides both the BDD and TDD.
Table of contents
IntroductionChaiOrganizing Test Cases with Mocha - describe() and it()Writing Tests With Mocha and ChaiMocha Hooks - before(), after(), beforeEach() and afterEach()Running Mocha TestsConclusion4 Comments
Sort: