Skip to content

Commit

Permalink
tests: fix wrong test manager mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
V-ed committed Jan 23, 2024
1 parent 8670913 commit e861649
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { MinioClientModule } from '$minio/minio-client.module';
import { beforeEach, describe, expect, it } from 'vitest';
import { TestManager } from '~utils/tests/TestManager';
import { ProfilePictureController } from './profile-picture.controller';
import { ProfilePictureService } from './profile-picture.service';
import { ProfilePictureModule } from './profile-picture.module';

describe('ProfilePictureController', () => {
const manager = new TestManager({
metadata: {
imports: [MinioClientModule],
imports: [ProfilePictureModule],
controllers: [ProfilePictureController],
providers: [ProfilePictureService],
},
});
let controller: ProfilePictureController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ import { ProfilePictureService } from './profile-picture.service';
imports: [MinioClientModule, TypedI18nModule, PresenceModule],
controllers: [ProfilePictureController],
providers: [ProfilePictureService, ProfilePictureResolver, ProfilePictureListener],
exports: [ProfilePictureService],
})
export class ProfilePictureModule {}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { MinioClientModule } from '$minio/minio-client.module';
import { PresenceModule } from '$users/presence/presence.module';
import { beforeEach, describe, expect, it } from 'vitest';
import { TestManager } from '~utils/tests/TestManager';
import { ProfilePictureService } from './profile-picture.service';

describe('ProfilePictureService', () => {
const manager = new TestManager({
metadata: {
imports: [MinioClientModule],
imports: [MinioClientModule, PresenceModule],
providers: [ProfilePictureService],
},
});
Expand Down
2 changes: 2 additions & 0 deletions api/src/@common/users/user/profile/profile.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { TestManager } from '~utils/tests/TestManager';
import { ProfileController } from './profile.controller';
import { UserProfileModule } from './profile.module';

describe('ProfileController', () => {
const manager = new TestManager({
metadata: {
imports: [UserProfileModule],
providers: [ProfileController],
},
});
Expand Down
3 changes: 2 additions & 1 deletion api/src/@common/users/user/profile/profile.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { RolesModule } from '$users/auth/roles/roles.module';
import { PresenceModule } from '$users/presence/presence.module';
import { Module } from '@nestjs/common';
import { ProfilePictureModule } from './profile-picture/profile-picture.module';
import { ProfileController } from './profile.controller';
import { UserProfileResolver } from './profile.resolver';
import { UserProfileService } from './profile.service';
import { ProfileController } from './profile.controller';

@Module({
imports: [RolesModule, ProfilePictureModule, PresenceModule, TypedI18nModule],
providers: [UserProfileResolver, UserProfileService],
controllers: [ProfileController],
exports: [UserProfileService],
})
export class UserProfileModule {}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { TestManager } from '~utils/tests/TestManager';
import { SecurityController } from './security.controller';
import { UserSecurityModule } from './security.module';

describe('SecurityController', () => {
const manager = new TestManager({
metadata: {
imports: [UserSecurityModule],
providers: [SecurityController],
},
});
Expand Down
3 changes: 2 additions & 1 deletion api/src/@common/users/user/security/security.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { AuthModule } from '$users/auth/auth.module';
import { LuciaModule } from '$users/auth/lucia/lucia.module';
import { Module } from '@nestjs/common';
import { SecurityController } from './security.controller';
import { UserSecurityResolver } from './security.resolver';
import { UserSecurityService } from './security.service';
import { SecurityController } from './security.controller';

@Module({
imports: [LuciaModule, AuthModule],
providers: [UserSecurityService, UserSecurityResolver],
controllers: [SecurityController],
exports: [UserSecurityService],
})
export class UserSecurityModule {}

0 comments on commit e861649

Please sign in to comment.