From 7b8e0d844b75be976f973a41c665d8e782664b53 Mon Sep 17 00:00:00 2001 From: John Brunton Date: Wed, 14 Aug 2024 19:37:33 +0100 Subject: [PATCH] fix: import --- services/api/src/app/dispatcher/dispatcher.service.spec.ts | 6 +++--- services/api/test/app.e2e-spec.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/api/src/app/dispatcher/dispatcher.service.spec.ts b/services/api/src/app/dispatcher/dispatcher.service.spec.ts index 18b0ba7f..87209d5b 100644 --- a/services/api/src/app/dispatcher/dispatcher.service.spec.ts +++ b/services/api/src/app/dispatcher/dispatcher.service.spec.ts @@ -2,7 +2,7 @@ import { TestRoomsRepository } from '@fixtures/data/test.rooms.repository'; import { DispatcherService } from './dispatcher.service'; import { TestMessagesRepository } from '@fixtures/data/test.messages.repository'; import { TestAuthService } from '@fixtures/auth/test-auth-service'; -import { DraftMessage, Message } from '@entities/messages'; +import { DraftMessage, SentMessage } from '@entities/messages'; import { RoomFactory } from '@fixtures/messages/room.factory'; import { UserFactory } from '@fixtures/messages/user.factory'; import { MockProxy, mock } from 'jest-mock-extended'; @@ -53,7 +53,7 @@ describe('DispatcherService', () => { await dispatcher.send(draft); - const expectedMessage: Message = { + const expectedMessage: SentMessage = { id: `message:${now.getTime()}`, time: now.getTime(), ...draft, @@ -74,7 +74,7 @@ describe('DispatcherService', () => { await dispatcher.send(draft); - const expectedMessage: Message = { + const expectedMessage: SentMessage = { id: `message:${now.getTime()}`, time: now.getTime(), ...draft, diff --git a/services/api/test/app.e2e-spec.ts b/services/api/test/app.e2e-spec.ts index ee9bbe7b..fb8a4693 100644 --- a/services/api/test/app.e2e-spec.ts +++ b/services/api/test/app.e2e-spec.ts @@ -10,7 +10,7 @@ import { FakeAuth0Client, } from '@fixtures/auth/FakeAuth'; import { map, omit } from 'rambda'; -import { Message } from '@entities/messages'; +import { SentMessage } from '@entities/messages'; import { MainModule } from '../src/main.module'; import { Auth0Client } from '@app/auth/auth0/auth0.client'; import { mock } from 'jest-mock-extended'; @@ -77,7 +77,7 @@ describe('AppController (e2e)', () => { .set('Authorization', `Bearer ${fakeAuth1.accessToken}`) .expect(200); - const removeIds = (messages: Message[]) => + const removeIds = (messages: SentMessage[]) => map((msg) => omit(['id'], msg), messages); expect(removeIds(body)).toEqual([