Skip to content

Commit e043138

Browse files
dhamanutdchinesedfan
authored andcommitted
test(button test): add assert check if Button without title (#901)
re #518
1 parent f60e4c5 commit e043138

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

__tests__/tests/components/Button.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ describe('<Button />', () => {
1313
expect(onPress.mock.calls.length).toEqual(1);
1414
});
1515

16+
it('correctly renders without title props', () => {
17+
const wrapper = render(<Button />);
18+
19+
expect(wrapper.find('text').text()).toEqual('missing title!');
20+
});
21+
1622
it('correctly renders with only title', () => {
1723
const wrapper = render(<Button title="test text" />);
1824

0 commit comments

Comments
 (0)