Skip to content

Commit

Permalink
test(button test): add assert check if Button without title (#901)
Browse files Browse the repository at this point in the history
re #518
  • Loading branch information
dhamanutd authored and chinesedfan committed Oct 31, 2019
1 parent f60e4c5 commit e043138
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __tests__/tests/components/Button.js
Expand Up @@ -13,6 +13,12 @@ describe('<Button />', () => {
expect(onPress.mock.calls.length).toEqual(1);
});

it('correctly renders without title props', () => {
const wrapper = render(<Button />);

expect(wrapper.find('text').text()).toEqual('missing title!');
});

it('correctly renders with only title', () => {
const wrapper = render(<Button title="test text" />);

Expand Down

0 comments on commit e043138

Please sign in to comment.