Skip to content

Commit

Permalink
fix: import
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunton committed Aug 14, 2024
1 parent 99d4a36 commit 7b8e0d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions services/api/src/app/dispatcher/dispatcher.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('DispatcherService', () => {

await dispatcher.send(draft);

const expectedMessage: Message = {
const expectedMessage: SentMessage = {
id: `message:${now.getTime()}`,
time: now.getTime(),
...draft,
Expand All @@ -74,7 +74,7 @@ describe('DispatcherService', () => {

await dispatcher.send(draft);

const expectedMessage: Message = {
const expectedMessage: SentMessage = {
id: `message:${now.getTime()}`,
time: now.getTime(),
...draft,
Expand Down
4 changes: 2 additions & 2 deletions services/api/test/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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([
Expand Down

0 comments on commit 7b8e0d8

Please sign in to comment.