In the previous chapter, we also had a user section for the application. In this chapter, we are going to extend those functionalities by adding the register and change password functionalities. We are going to reuse the existing code base and add the new features.
We will create a test file specifically for the user model. This will come in handy for testing all its functionalities without booting up the entire application. Create a file called
test/integration/user.model.test.js and add the following content:
'use strict'; /** * Important! Set the environment to test */ process.env.NODE_ENV = 'test'; const chai = require('chai'); const should = chai.should(); consst config = require('../../config/environments/test'); ...