title: Mock sequelize-typescript model
body: <p>I'm trying to mock a <code>sequelize-typescript</code> model to test whether a procedure with a side effect, which updates a model does it correctly, without a need to connect to a database. Since it is not possible to create a model instance without Sequelize instance, I'm stuck. I found multiple sequelize mocking packages non of which have typescript DefinitelyTyped typings.</p>
  
  <pre class="lang-js prettyprint-override"><code>describe("A test", function () {
    let sandbox: SinonSandbox
    let user: User
  
    before(function () {
      sandbox = sinon.createSandbox()
      sandbox.stub(User, "findOne").callsFake(() =&gt; user)
    })
  
    beforeEach(function () {
      user = new User(userProps) // This is not allowed
    })
  
    it("should test side effects", function () {
        testFunction()
        expect(user.property).to.be.equal(someValue)
    })
  })
  </code></pre>