title: How to implement e2e testing in Nest JS Framework
body: <p>I am new this Framework. I implemented crud operation, migration, unit testing also but I do know how to implement e2e testing in nest JS Framework. I tried to run the e2e testing program it's throwing an error
  How to fix this error. I tried many ways but I could not get the solution
  <a href="https://i.stack.imgur.com/5hjwa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5hjwa.png" alt="enter image description here" /></a>It showing this error <strong>No repository for &quot;UserEntity&quot; was found. Looks like this entity is not registered in current &quot;default&quot; connection?</strong>. So, I tried to change my database configuration</p>
  <p><strong>Database configuration</strong></p>
  <pre><code>{
                type: 'postgres',
                host:  process.env[`${process.env.NODE_ENV}_POSTGRES_HOST`],
                port: parseInt(process.env[`${process.env.NODE_ENV}_POSTGRES_PORT`]) || 5432,
                username: process.env[`${process.env.NODE_ENV}_POSTGRES_USER`],
                password: process.env[`${process.env.NODE_ENV}_POSTGRES_PASSWORD`],
                database: process.env[`${process.env.NODE_ENV}_POSTGRES_DATABASE`],
                entities: [&quot;dist/**/*.entity{ .ts,.js}&quot;],
                migrations: [&quot;dist/database/migration/*.js&quot;],
                cli:{
                    migrationsDir: 'src/database/migration',
                    }
              }
  </code></pre>
  <p>This problem is occurred in the <strong>entities column</strong> in the database configuration. If I change the entities directory the application cannot run. how to fix this issue</p>
  <p><strong>tsconfig.json</strong></p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;declaration&quot;: true,
      &quot;removeComments&quot;: true,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;target&quot;: &quot;es2017&quot;,
      &quot;sourceMap&quot;: true,
      &quot;outDir&quot;: &quot;./dist&quot;,
      &quot;baseUrl&quot;: &quot;./&quot;,
      &quot;incremental&quot;: true
    }
  }
  </code></pre>