Closed
Description
react-testing-library
version: 1.0.1node
version: n/anpm
(oryarn
) version: n/a
Relevant code or config
expect(queryByTestId('greeting-text').textContent).toBe('hello there')
What you did:
Did not render the element with 'greeting-text'
identifier.
What happened:
TypeError: Cannot read property textContent of null
Reproduction repository:
https://codesandbox.io/s/4q3zol71y9
Problem description:
The error does not describe what has gone wrong.
Suggested solution:
Throw a user-friendly error.