Test React element height with Jest
问题 I have a very simple React.js component that decorates a long block of markup with "Read more" / "Read less" functionality. I have a few tests with Jest working, however, I am unable to assert that the DOM element height is increasing to the size of the original content. In the Jest test environment my call to getDOMNode().scrollHeight does not appear to return anything. Here is a link to the repository with the code and failing test: https://github.com/mguterl/react-jest-dom-question Below