From 3ef895ef7247e383374aba9ab54367c7c004e7fa Mon Sep 17 00:00:00 2001 From: Illia Rudniev Date: Wed, 28 Jun 2023 23:48:41 +0300 Subject: [PATCH] fix: updated dependencies in test to fix CI --- .../user-activity-tracker.middleware.unit.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/services/workflows-service/src/common/middlewares/user-activity-tracker.middleware.unit.test.ts b/services/workflows-service/src/common/middlewares/user-activity-tracker.middleware.unit.test.ts index ea4869e57f..6c92aa0bbd 100644 --- a/services/workflows-service/src/common/middlewares/user-activity-tracker.middleware.unit.test.ts +++ b/services/workflows-service/src/common/middlewares/user-activity-tracker.middleware.unit.test.ts @@ -1,13 +1,17 @@ import { AppLoggerService } from '@/common/app-logger/app-logger.service'; import { UserActivityTrackerMiddleware } from '@/common/middlewares/user-activity-tracker.middleware'; import { PrismaModule } from '@/prisma/prisma.module'; -import { commonTestingModules } from '@/test/helpers/nest-app-helper'; -import { UserModule } from '@/user/user.module'; import { UserService } from '@/user/user.service'; +import { UserRepository } from '@/user/user.repository'; import { Test, TestingModule } from '@nestjs/testing'; import { User } from '@prisma/client'; import { Request, Response } from 'express'; import dayjs from 'dayjs'; +import { commonTestingModules } from '@/test/helpers/nest-app-helper'; +import { PasswordService } from '@/auth/password/password.service'; +import { env } from '@/env'; + +env.BCRYPT_SALT = 12; describe('UserActivityTrackerMiddleware', () => { const testUserPayload = { @@ -25,7 +29,8 @@ describe('UserActivityTrackerMiddleware', () => { beforeEach(async () => { app = await Test.createTestingModule({ - imports: [UserModule, PrismaModule, ...commonTestingModules], + imports: [PrismaModule, ...commonTestingModules], + providers: [UserService, UserRepository, PasswordService], }).compile(); middleware = new UserActivityTrackerMiddleware(app.get(AppLoggerService), app.get(UserService)); userService = app.get(UserService);