From 00965cf37bd9c9334fba24de0d891cfb833d7d60 Mon Sep 17 00:00:00 2001 From: Ruben Gutierrez Date: Thu, 8 Dec 2022 13:27:09 -0400 Subject: [PATCH] fix tests --- src/subscriptions/subscriptions.service.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/subscriptions/subscriptions.service.spec.ts b/src/subscriptions/subscriptions.service.spec.ts index 9532e69..8baf18a 100644 --- a/src/subscriptions/subscriptions.service.spec.ts +++ b/src/subscriptions/subscriptions.service.spec.ts @@ -6,6 +6,7 @@ import { mockEvents } from '../../mocks/events-mocks' import { mockPinoService } from '../../mocks/pino-mocks' import { mockExtrinsics, mockTimestamp, mockTransactions } from '../../mocks/transactions-mock' import { BlocksService } from '../blocks/blocks.service' +import { DbService } from '../db/db.service' import { EnvModule } from '../env/env.module' import { EventsService } from '../events/events.service' import { SyncService } from '../sync/sync.service' @@ -15,9 +16,6 @@ import { SubscriptionsService } from './subscriptions.service' jest.mock('@polkadot/api') jest.mock('../utils') -jest.mock('../../mongo-indexes', () => ({ - main: jest.fn(), -})) describe('subscriptionsService', () => { let service: SubscriptionsService @@ -70,6 +68,12 @@ describe('subscriptionsService', () => { updateSync: jest.fn(), }, }, + { + provide: DbService, + useValue: { + addIndexes: jest.fn(), + }, + }, mockPinoService(SubscriptionsService.name), ], }).compile()