From the course: Node.js: Testing and Code Quality

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Challenge: Isolate routes for faster tests

Challenge: Isolate routes for faster tests

From the course: Node.js: Testing and Code Quality

Challenge: Isolate routes for faster tests

(upbeat music) - [Instructor] In this chapter, we saw that functional testing can be slower than just unit testing due to the complexity of setting up and tearing down the application. How can we minimize that overhead and speed up testing? Your challenge is to restructure both the application and tests so an individual router can be tested using the base-application configuration. I'll give you a hint. Is it easier to mock one file or mock all files except one? When you're done, check out one possible solution in the next video. See you in a moment.

Contents