Skip to content

Commit

Permalink
fix typos, moves notification repository mock to __tests__ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
PooyaRaki committed Nov 7, 2024
1 parent cdc9216 commit 73984fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/domain/notifications/v2/notifications.repository.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,14 @@ describe('NotificationsRepositoryV2', () => {
});

describe('getSubscribersBySafe()', () => {
it('Should succesfully return subscribers by safe', async () => {
const mockSbuscribers = Array.from(
it('Should successfully return subscribers by safe', async () => {
const mockSubscribers = Array.from(
{ length: 5 },
(): NotificationSubscription =>
notificationSubscriptionBuilder().build(),
);
notificationSubscriptionsRepository.find.mockResolvedValue(
mockSbuscribers,
mockSubscribers,
);
mockPostgresDatabaseService.getRepository.mockResolvedValue(
notificationSubscriptionsRepository,
Expand All @@ -313,7 +313,7 @@ describe('NotificationsRepositoryV2', () => {
safeAddress: faker.string.hexadecimal({ length: 32 }) as `0x${string}`,
});

const output = mockSbuscribers.map(
const output = mockSubscribers.map(
(subscription: NotificationSubscription) => {
return {
subscriber: subscription.signer_address,
Expand Down
1 change: 0 additions & 1 deletion src/domain/notifications/v2/notifications.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class NotificationsRepositoryV2 implements INotificationsRepositoryV2 {
private readonly pushNotificationsApi: IPushNotificationsApi,
@Inject(LoggingService)
private readonly loggingService: ILoggingService,

@Inject(PostgresDatabaseService)
private readonly postgresDatabaseService: PostgresDatabaseService,
) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Module } from '@nestjs/common';
import { INotificationsRepositoryV2 } from '@/domain/notifications/v2/notifications.repository.interface';
import { MockNotificationRepositoryV2 } from '@/domain/notifications/v2/test.notification.repository.interface';
import { MockNotificationRepositoryV2 } from '@/domain/notifications/v2/entities/__tests__/notification.repository.mock';

@Module({
providers: [
Expand Down

0 comments on commit 73984fe

Please sign in to comment.