Testing all middleware functions

Now, it's time for you to write some unit tests yourself. Try following the same approach to test the checkContentTypeIsJsoncheckContentTypeIsSet, and errorHandler middleware functions. Refer to the code bundle for help if needed. As always, run the tests and commit your code!

Once all of our middleware functions have been unit tested, we will move on to testing the request handlers and the engine.

Get Building Enterprise 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.