title: "It" statement keep using regular database instead of the test database
body: <p>I am  doing some testing and I just want to test my endpoint. What goes in and what does out that's it.</p>
  
  <p>I have a test database that I want to use when the test run.</p>
  
  <p>in "BeforeAll" I connect to the test database and in my beforeach I make a post of a user.
  It work it's inserted in the test database</p>
  
  <p>The problem is as soon as I try to make a request in a "It" statement , the database used is app one not the test database :/</p>
  
  <pre><code>beforeAll(async () =&gt; {
      await mongoose.connect(testDatabase);
  });
  afterAll(async function () {
      await mongoose.disconnect()
  });
  
  describe('/user', () =&gt; {
      let app;
  
      beforeEach(async () =&gt; {
          const moduleFixture: TestingModule = await Test.createTestingModule({
              imports: [AppModule, UserModule],
          }).compile();
  
          app = moduleFixture.createNestApplication();
          await app.init();
  
          // this send correctly data to the TEST database
  enter code here
          return request(app.getHttpServer()) 
              .post('/user').send(TEST_USER)
              .set('Accept', 'application/json')
              .expect(201)
              .then(r =&gt; console.log("Result of post", r.body))
      });
  
      it('GET', () =&gt; {
          // my probleme here : this retrieve the regular database content (setup in main file) NOT THE TEST database setup in beforeAll
          return request(app)
              .get('/user')
              .expect(200)
              .then(r =&gt; console.log("Result of get", r.body))
      });
  });
  </code></pre>
  
  <p>I am doing it wrong ?
  Thank you guys !</p>