Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Dec 8, 2019
1 parent a03b283 commit 80ace80
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Calendar.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ describe('Calendar', () => {
expect(monthView.prop('showWeekNumbers')).toBeTruthy();
});

it('passes showNeighboringMonth flag to MonthView component given showNeighboringMonth flag', () => {
const component = shallow(
<Calendar
showNeighboringMonth
view="month"
/>,
);

const monthView = component.find('MonthView');

expect(monthView.prop('showNeighboringMonth')).toBeTruthy();
});

it('displays a view with a given value when value is given', () => {
const value = new Date(2017, 0, 15);
const component = mount(
Expand Down

0 comments on commit 80ace80

Please sign in to comment.