14.10 Outlook: Testing in Nest
One issue we’ve completely ignored so far is checking the functionality we’ve implemented. At this point, we’re getting a little ahead of Chapter 23, which covers testing, but only to show you how convenient it can be to write tests for your application in Nest. So, if some terms or concepts are unfamiliar to you, you can learn even more about testing in Chapter 23.
When you create structures for your application via the Nest CLI, the command-line tool not only creates the actual file but also a test file. As an example, let’s take the MovieController and test the getAllMovies method there. In this test, it’s important that we only want to test the controller and not the implementation of the underlying service. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access