Courses

Test with Jest - Hands on TDD - The Find Method

In this lesson, we'll continue working on our library in a test-driven fashion. We'll implement the find method, a method that allows us to search for existing records.

Along the way, we'll find the need for a more sophisticated architecture when it comes to the record method.

Remember to return a copy of the record, instead of the actual record so it cannot be altered outside the Model class.