Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Sep 27, 2024
1 parent 87abffc commit 10db463
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ import { Context } from '@twilio-labs/serverless-runtime-types/types';

export type ConversationSid = `CH${string}`;

type SendErrorMessageForUnsupportedMediaEvent = {
type OnMessageAddedEvent = {
EventType: 'onMessageAdded';
Body?: string;
ConversationSid: ConversationSid;
Media?: Record<string, any>;
DateCreated: Date;
};

export type Event = SendErrorMessageForUnsupportedMediaEvent;
export type Event = OnMessageAddedEvent;

const FALLBACK_ERROR_MESSAGE = 'Unsupported message type.';
const ERROR_MESSAGE_TRANSLATION_KEY = 'UnsupportedMediaErrorMsg';
Expand Down
2 changes: 1 addition & 1 deletion tests/webhooks/serviceConversationListener.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('serviceConversationListener', () => {
EventType: undefined,
Media: {},
DateCreated: new Date(),
};
} as any;

const callback: ServerlessCallback = (err, result) => {
expect(result).toBeDefined();
Expand Down

0 comments on commit 10db463

Please sign in to comment.