Chapter 5Test-Drive Node.js Apps

In part 1, we covered various techniques for writing automated tests, verifying the behavior of asynchronous functions, and tackling dependencies. We’re now ready to put them all together as we test-drive the design and implementation of an entire Node.js application, from start to finish.

Node.js has emerged as a popular JavaScript runtime for the server side. It’s a powerful environment and a lot of fun to code. But how do you tell if the code actually works, for various inputs, the different edge cases, through network failures, and when some required files go missing? Running the application manually and trying out different scenarios is not an option you’ve come here for. This chapter will walk you ...

Get Test-Driving JavaScript Applications 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.