Summary

You learned about testing server-side JavaScript using Mocha, and Chai in this chapter. We developed a simple application where users can log in to see dashboard and create tickets while keeping the data in MongoDB. You learned how Mocha handles asynchronous operations for unit tests.

Following a proper process, naming conventions for development plays a very important role. It's more valued when we say that test cases act as alternative documentation. In the next chapter, we will learn best practices for test-driven JavaScript development.

Get Test-Driven JavaScript Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.