Test with Jest

Watch this course for FREE this weekend only.
Create an account to start watching.

or

Customizable Options

In the previous lesson, we implemented a more sophisticated architecture for our record method, which inevitably can be customized to different use cases. In this lesson, we'll refactor our Model class, so we can overrule the field we use as the primary key in our collection. As with every lesson in this chapter, we'll do this following the test-driven development principles by writing our specs first, before we implement the features.

If you haven’t refactored your test suite according to the previous lesson, to use the createModel function, we advise you to pause the video and do so now or to download the source code before you continue.