react-a11y
react-a11y copied to clipboard
How to test relations between tags
I was trying to test that every input tag has its correspondent label tag. How can I do this in a DOM-less environment?
My initial thought would be we could make such an assertion after the component has rendered using a componentDidMount callback. This is the approach I took for implementing logging of DOM element references.