title: Why does Mocha not restart Express correctly when I use --watch mode?
body: <p>I want to run tests on the API routes of my Express App. I use Mongoose and it's Schemas for DB operations. This is my Setup of the test (it runs successfully first, but then fails when it reloads...):</p>
  
  <pre><code>const request = require('supertest');
  // this loads the whole express app
  const app = require('../../server');
  
  describe('[Auth]', function () {
    it('returns 401 with invalid credentials', function (done) {
      request(app)
        .post('/auth/login')
        .field('email', 'invalidMail')
        .field('password', 'invalidPassword')
        .expect('Content-Type', contentType)
        .expect(401, done);
    }
  }
  </code></pre>
  
  <p>This test is successfull when I start mocha. I start it in <code>--watch mode</code> and whenever I save a file and mocha restarts the test i get the following error:</p>
  
  <pre><code>MongooseError: Cannot overwrite `user` model once compiled.
      at Mongoose.model (...\node_modules\mongoose\lib\index.js:376:13)
      ...
  </code></pre>
  
  <p>What I tried is connecting and disconnecting Mongoose in the <code>before</code> and <code>after</code> hooks but that didn't change anything.</p>
  
  <p>Seems to me that Mocha is just reloading my app without stopping it first. What am I missing here? What's the best practice?</p>