diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx index 436c7cf205..5d3ef1bf61 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx @@ -80,7 +80,9 @@ describe('Organisation Dashboard Page', () => { // Checking if events are rendered expect(screen.getByText('Event 1')).toBeInTheDocument(); expect( - screen.getByText(`${dayjs(new Date()).add(1, 'day').toString()}`) + screen.getByText( + `${dayjs(dayjs(new Date()).add(1, 'day')).format('MMM D, YYYY')}` + ) ).toBeInTheDocument(); // Checking if posts are rendered diff --git a/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts b/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts index 27950d3a39..6807df2287 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts +++ b/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts @@ -101,7 +101,7 @@ export const MOCKS = [ _id: 1, title: 'Event 1', description: 'Event Test', - startDate: dayjs(new Date()).add(1, 'day').toString(), + startDate: dayjs(new Date()).add(1, 'day'), endDate: dayjs(new Date()).add(3, 'day'), location: 'New Delhi', startTime: '',