• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Code The Dream School
Code the Dream Labs Logo

Code The Dream School

Main hub for class materials for Code the Dream’s classes

  • Code the Dream Home

Search Code The Dream School

CTD Node/Express Class Lesson 14: Testing with Mocha and Chai

Lesson Materials

Any large development project requires automated testing to ensure that nothing is broken as the application is maintained and as features are added. The testing also ensures that the program works to specifications. Manual testing with Postman or other tools is time consuming and error prone. This lesson gives practice in developing an API and shows how to do automated Express testing.

Assignments

Coding Assignment

You fork and clone this repository. Be sure that when you clone the repository the active directory is not inside node-express-course or any other git repository. The instructions for this lesson are in the README.md for the repository, as viewed in github, and they include directions on how to submit your work.

You are instructed to complete the tests, which are the files tests/tests.js and tests/puppeteer.js. Now, there are some places in these test files where the current code for the test just says done(), or, for the puppeteer tests, where the test function is empty. These are the places that you have to add code to complete the test. However … this is not too easy, actually, so in case you get stuck, I have a sample answer repository that you can look at here.

Mindset Assignment

Your mindset assignment for this week can be found here: Asking for Help – part 2

Submitting Your Work

When you are done, use the same procedure as for previous lessons. You do a git add, git commit, and git push for the week15 branch, create your pull request on github, and put a link to your pull request in your assignment submission form below.

When you’ve completed your Coding Assignment and Mindset Assignment this week, submit all of your work using:

Alpaca class use:Squibby 2.0 Assignment Submission Form
Baboon and any 2023 classes use:Homework Assignment Submission Form

Footer

Copyright © 2025 Code the Dream School | All Rights Reserved | Privacy Policy