diff --git a/Backend/src/app/shared/shared.controller.spec.ts b/Backend/src/app/shared/shared.controller.spec.ts index e7744c3..d1f0c0b 100644 --- a/Backend/src/app/shared/shared.controller.spec.ts +++ b/Backend/src/app/shared/shared.controller.spec.ts @@ -1,5 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { SharedController } from './shared.controller'; +import { DatabaseService } from '../../database/database.service'; describe('SharedController', () => { let controller: SharedController; @@ -7,6 +8,7 @@ describe('SharedController', () => { beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ controllers: [SharedController], + providers: [DatabaseService], }).compile(); controller = module.get(SharedController); diff --git a/Backend/src/cameraStream/cameraStream.gateway.spec.ts b/Backend/src/cameraStream/cameraStream.gateway.spec.ts index 67ad93b..1158e50 100644 --- a/Backend/src/cameraStream/cameraStream.gateway.spec.ts +++ b/Backend/src/cameraStream/cameraStream.gateway.spec.ts @@ -4,13 +4,14 @@ import { JwtModule } from '@nestjs/jwt'; import { OpenVidu } from 'openvidu-node-client'; import { CSSOpenVidu } from './open-vidu.service'; +import { DatabaseService } from '../database/database.service'; describe('WebStreamGateway', () => { let gateway: CameraStreamGateway; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - providers: [CameraStreamGateway, CSSOpenVidu], + providers: [CameraStreamGateway, CSSOpenVidu, DatabaseService], imports: [ JwtModule.register({ global: true, diff --git a/Backend/src/validators/camera-id/camera.pipe.spec.ts b/Backend/src/validators/camera-id/camera.pipe.spec.ts index 1ecba0c..faeae7f 100644 --- a/Backend/src/validators/camera-id/camera.pipe.spec.ts +++ b/Backend/src/validators/camera-id/camera.pipe.spec.ts @@ -4,8 +4,8 @@ describe('CameraIdPipe', () => { const validator = new PositiveNumberValidator(); it('should throw as not correct value', () => { expect(() => validator.transform('-200')).toThrow(); - expect(() => validator.transform('200')).toEqual(200); - expect(() => validator.transform(',')).toEqual(undefined); - expect(() => validator.transform(undefined)).toEqual(undefined); + expect(validator.transform('200')).toBe(200); + expect(validator.transform(',')).toEqual(undefined); + expect(validator.transform(undefined)).toEqual(undefined); }); });