Sequelize Model Definition Practice

This is a small set of tests to check your understanding of defining models using Sequelize and Postgres. There's more to it that you should know (hooks, classMethods, associations, etc.), so don't just stop learning once you've completed these tests. However, if you complete them and fully understand how everything is working, you're on the right track.

Setup

  • These tests require a database called sequelize_practice, so be sure to set that up before getting started. Feel free to use psql or your favorite Postgres GUI.
  • npm i[install] or yarn [install] to pull in the package's dependencies. You shouldn't need to install any others to pass the tests.
  • npm t[est] to run all the tests in "watch" mode.

Getting Started

Write all your code in models/user.js. The scaffolding has been provided for you.