Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

test: add Datepicker snapshot again #351

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions main/__tests__/DatePicker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const standardDate = new Date('2020-09-13');

describe('[DatePicker] render', () => {
it('should render without crashing', () => {
const rendered = render(<DatePicker selectedDate={standardDate} locale={'en'} />).asJSON();
const rendered = render(<DatePicker selectedDate={standardDate} locale={'en-US'} />).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
});
Expand All @@ -32,7 +32,7 @@ describe('[DateInput] render', () => {
<DateInput onPressCalendar={(): void => {}} selectedDate={standardDate} />,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
describe('[DateInput] Interaction', () => {
Expand Down Expand Up @@ -67,11 +67,11 @@ describe('[PickerCalendar] render', () => {
visible={false}
onSelectDate={(): void => {}}
selectedDate={standardDate}
locale={'en'}
locale={'en-US'}
weekdayFormat={'narrow'} />,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
});
Expand All @@ -83,11 +83,11 @@ describe('[Calendar]', () => {
initDate={standardDate}
renderDay={() => <CalendarDate date={standardDate} isToday={false} />}
calendarWidth={300}
locale={'en'}
locale={'en-US'}
/>,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
});
Expand All @@ -98,7 +98,7 @@ describe('[CalendarDate] render', () => {
<CalendarDate onPress={(): void => {}} date={standardDate} isToday={false} />,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});

Expand Down Expand Up @@ -138,18 +138,18 @@ describe('[CalendarMonth] render', () => {
/>,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
});

describe('[CalendarWeekDays] render', () => {
it('should render without crashing', () => {
const rendered = render(
<CalendarWeekDays calendarWidth={300} weekdayFormat={'narrow'} locale={'en'} />,
<CalendarWeekDays calendarWidth={300} weekdayFormat={'narrow'} locale={'en-US'} />,
).asJSON();

// expect(rendered).toMatchSnapshot();
expect(rendered).toMatchSnapshot();
expect(rendered).toBeTruthy();
});
});
Loading