Test with Jest
Plans from $25/month

This lesson is for members. Join us?

Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!

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.