Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Sep 19, 2023
1 parent 68ebc30 commit f04ad03
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/editor/LabelWrapper.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,28 @@ describe('LabelWrapper', () => {
</LabelWrapper>,
);
});
it('renders without crashing with no tooltip_size', () => {
const props = {
attributes: {},
element: {
data: {
uid: '123',
label_type: 'type',
label_pointing: 'pointing',
tooltip_content: [{ text: 'Tooltip Content' }],
tooltip_pointing: 'top center',
always_show: true,
tooltip_type: 'info',
tooltip_size: undefined,
},
},
};
render(
<LabelWrapper {...props}>
<div>Test</div>
</LabelWrapper>,
);
});

it('renders without crashing with no tooltip _content', () => {
const props = {
Expand Down

0 comments on commit f04ad03

Please sign in to comment.