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

Commit

Permalink
test: add Datepicker snapshot again
Browse files Browse the repository at this point in the history
  • Loading branch information
oh3vci authored and JeffGuKang committed Sep 17, 2020
1 parent 6f452bc commit 81181ea
Show file tree
Hide file tree
Showing 2 changed files with 12,739 additions and 11 deletions.
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

0 comments on commit 81181ea

Please sign in to comment.