Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed May 19, 2018
1 parent 32ba3de commit 9bf4b07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/material-ui/src/ListItem/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ ListItem.propTypes = {
* If `true`, a 1px light border is added to the bottom of the list item.
*/
divider: PropTypes.bool,
/**
* @ignore
*/
focusVisibleClassName: PropTypes.string,
};

Expand Down
11 changes: 11 additions & 0 deletions packages/material-ui/src/ListItem/ListItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,15 @@ describe('<ListItem />', () => {
assert.strictEqual(wrapper.hasClass('bubu'), true);
});
});

describe('prop: focusVisibleClassName', () => {
it('should merge the class names', () => {
const wrapper = shallow(<ListItem button focusVisibleClassName="focusVisibleClassName" />);
assert.strictEqual(wrapper.props().component, 'div');
assert.strictEqual(
wrapper.props().focusVisibleClassName,
`${classes.focusVisible} focusVisibleClassName`,
);
});
});
});

0 comments on commit 9bf4b07

Please sign in to comment.