Skip to content

Commit

Permalink
fix(avatar): ignore coverage for initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Nictheboy committed Jun 15, 2024
1 parent 61b4392 commit 1f30bfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/avatars/avatars.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export class AvatarsService implements OnModuleInit {

const defaultAvatarPath = join(sourcePath, defaultAvatarName);

// Before one test run, the table is ether empty or has the default avatar
// so the test will not cover all branches.
// However, the test will cover all branches in the second run.
// So we ignore the coverage for this part.
/* istanbul ignore next */
await this.entityManager.transaction(
async (entityManager: EntityManager) => {
const avatarRepository = entityManager.getRepository(Avatar);
Expand Down

0 comments on commit 1f30bfb

Please sign in to comment.