diff --git a/src/types/onyx/ReportAction.ts b/src/types/onyx/ReportAction.ts index 1b420c7dda54..3ec98fd43178 100644 --- a/src/types/onyx/ReportAction.ts +++ b/src/types/onyx/ReportAction.ts @@ -10,7 +10,7 @@ import type {Receipt} from './Transaction'; type Message = { /** The type of the action item fragment. Used to render a corresponding component */ - type?: string; + type: string; /** The text content of the fragment. */ text: string; diff --git a/tests/unit/isReportMessageAttachmentTest.ts b/tests/unit/isReportMessageAttachmentTest.ts index 3014111d5c2c..a20f0646b5dd 100644 --- a/tests/unit/isReportMessageAttachmentTest.ts +++ b/tests/unit/isReportMessageAttachmentTest.ts @@ -6,18 +6,19 @@ describe('isReportMessageAttachment', () => { const message: Message = { text: '[Attachment]', html: '', + type: '', }; expect(isReportMessageAttachment(message)).toBe(true); }); it('returns false if a report action is not attachment', () => { - let message: Message = {text: '[Attachment]', html: '[Attachment]'}; + let message: Message = {text: '[Attachment]', html: '[Attachment]', type: ''}; expect(isReportMessageAttachment(message)).toBe(false); - message = {text: '[Attachment]', html: '[Attachment]'}; + message = {text: '[Attachment]', html: '[Attachment]', type: ''}; expect(isReportMessageAttachment(message)).toBe(false); - message = {text: '[Attachment]', html: '[Attachment]'}; + message = {text: '[Attachment]', html: '[Attachment]', type: ''}; expect(isReportMessageAttachment(message)).toBe(false); }); });