title: How to do unit tests with NodeJs (typescript) and Sequelize 5 (PostgreSQL)?
body: <p>I try to build an api with Sequelize 5 but I don't know how to do unit tests. I'm getting the interface tests done. But for example, on my data model I don't know how to do that.</p>
  <p>I looked at the &quot;sequelize-test-helpers&quot; npm package but my data model is unarchitected in the same way. So.. do I need to modify the architecture of my code or do you have a solution ?</p>
  <p>interface of my location data model :</p>
  <pre><code>export interface ICoordinates {
      type: string;
      coordinates: number[];
  }
  
  export default interface ILocation {
      id: string;
      coordinates: ICoordinates;
      description?: string | undefined | null;
      name: string;
      type_id: number;
      owner: string;
  }
  </code></pre>
  <p>my location data model :</p>
  <pre><code>import { sequelize } from '../config/postgres';
  import { Model, DataTypes } from 'sequelize';
  import ILocation, { ICoordinates } from './interfaces/location.interface';
  
  export class Location extends Model implements ILocation {
      public id!: string;
      public coordinates!: ICoordinates;
      public description: string | undefined | null;
      public name!: string;
      public type_id!: number;
      public owner!: string;
  }
  
  Location.init({
      id: { type: DataTypes.TEXT, primaryKey: true, allowNull: false},
      coordinates: { type: DataTypes.GEOMETRY('POINT', 4326), allowNull: false },
      description: { type: DataTypes.TEXT},
      name: { type: DataTypes.STRING, allowNull: false },
      type_id: { type: DataTypes.NUMBER, allowNull: false },
      owner: { type: DataTypes.TEXT, allowNull: false }
  }, {
      tableName: &quot;location&quot;,
      sequelize,
      timestamps: false
  });
  </code></pre>