Unit Testing in JavaScript

About

In this module, we’ll explore Unit Testing with JavaScript, focusing on the basics using Mocha and Chai. You’ll gain practical skills in writing tests for both individual units of code and Express routes. Mastering unit testing, a highly sought-after skill in the industry, will boost your ability to ensure code quality and reliability in your projects.

Content

Lesson Skills
Setup Setting up the development environment
Concepts Understanding the importance of Unit Testing
A Case for Unit Tests How unit testing prevents unintended code changes
Unit Tests with Mocha/Chai Writing unit tests with the framework Mocha/Chai
Testing Express Routes Unit Testing Express routes
Testing More Complex Routes Unit Testing a post route in Express

References

📖 Reference Materials

Internal

Prerequisites

Additional Prerequisites For

Starter code

🟢 Starter code

Course landing pages

Resources

✏️ Instructor Guide

🎥 Video Hub

🏗️ Release Notes


Find a 👾 bug 👾 or have suggestions? Let us know!