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
Internal
Prerequisites
- Intro to Node
Additional Prerequisites For
- Testing Express Routes
-
Testing More Complex Routes
- Intro to Express
- Intro to Mongoose
Starter code
Course landing pages
Resources
Find a 👾 bug 👾 or have suggestions? Let us know!