Introduction
  • Introduction
Overview and Setting Up Your Development Environment
  • What is Unit Testing?
  • What is Test Driven Development
  • Quick Example TDD Session - The FizzBuzz Kata
  • Installing Mocha and Chai
  • Setting Up Mocha Test Runners in Webstorm
  • Setting Up Mocha Test Runners in Visual Studio Code
  • Running Mocha from the Command Line
  • Unit Testing and Test-Driven Development Quiz
Exploring Mocha and Chai with Examples
  • Mocha and Chai Introduction and Overview
  • Test Discovery
  • Test Suites
  • Test Setup and Teardown
  • Assert Statements with the Chai Assert Library
  • Testing Asynchronous Code
Hands-On Example - Implementing a Checkout Cart with TDD
  • Overview
  • Setup and First Test Case
  • Add Items, Add Item Prices, and Calculate Total
  • Add Multiple Items and Calculate Total
  • Add and Apply Discounts
  • Throw Exception when Adding an Item with No Price
Isolating Your Unit Tests
  • Overview of Test Doubles with Mocha
  • Sinon Example
  • Test Doubles Quiz
Best Practices for Unit Testing and TDD
  • Unit Testing and TDD Best Practices
  • Overview of Code Coverage
  • Hands On Example of Code Coverage
Conclusion
  • Conclusion