fix prisma health tests

This commit is contained in:
sbriat 2023-05-04 10:11:19 +02:00
parent be529c111a
commit 47e4abf594
1 changed files with 5 additions and 5 deletions

View File

@ -1,10 +1,10 @@
import { Test, TestingModule } from '@nestjs/testing';
import { PrismaHealthIndicatorUseCase } from '../../domain/usecases/prisma.health-indicator.usecase';
import { UsersRepository } from '../../../user/adapters/secondaries/users.repository';
import { PrismaClientKnownRequestError } from '@prisma/client/runtime';
import { HealthCheckError, HealthIndicatorResult } from '@nestjs/terminus';
import { AdsRepository } from '../../../ad/adapters/secondaries/ads.repository';
import { PrismaClientKnownRequestError } from '@prisma/client/runtime/library';
const mockUsersRepository = {
const mockAdsRepository = {
healthCheck: jest
.fn()
.mockImplementationOnce(() => {
@ -25,8 +25,8 @@ describe('PrismaHealthIndicatorUseCase', () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
{
provide: UsersRepository,
useValue: mockUsersRepository,
provide: AdsRepository,
useValue: mockAdsRepository,
},
PrismaHealthIndicatorUseCase,
],