Skip to content

Commit

Permalink
Merge pull request #32333 from Expensify/monil-fixCalendarTest
Browse files Browse the repository at this point in the history
[No QA]Fix CalendarPicker test
  • Loading branch information
MonilBhavsar authored Dec 1, 2023
2 parents dad6391 + b7075a4 commit 2a7b028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/CalendarPickerTest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {fireEvent, render, within} from '@testing-library/react-native';
import {addYears, subYears} from 'date-fns';
import {addMonths, addYears, subYears} from 'date-fns';
import CalendarPicker from '../../src/components/NewDatePicker/CalendarPicker';
import CONST from '../../src/CONST';
import DateUtils from '../../src/libs/DateUtils';
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('CalendarPicker', () => {

fireEvent.press(getByTestId('next-month-arrow'));

const nextMonth = new Date().getMonth() + 1;
const nextMonth = addMonths(new Date(), 1).getMonth();
expect(getByText(monthNames[nextMonth])).toBeTruthy();
});

Expand Down

0 comments on commit 2a7b028

Please sign in to comment.