Enable anchor-has-content rule (#10908)

This commit is contained in:
Kamil Gabryjelski
2020-09-16 22:27:52 +02:00
committed by GitHub
parent 2a5946d117
commit 281305e0cf
3 changed files with 7 additions and 3 deletions

View File

@@ -22,11 +22,13 @@ import ControlSetRow from 'src/explore/components/ControlRow';
describe('ControlSetRow', () => {
it('renders a single row with one element', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />]} />);
expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toExist();
});
it('renders a single row with two elements', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />, <a />]} />);
expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toHaveLength(2);