Closed
Description
react-testing-library
version: 6.1.1react
version: 16.8.6node
version: 11.10.1yarn
version: 1.13.0jest-dom
version: 3.1.3
What you did:
Just run yarn create react-app from-scratch --typescript
Add the react-testing-library
and jest-dom
to the package.json, update the App.test.tsx
with:
import React from 'react';
import {render, waitForElement } from 'react-testing-library'
import 'jest-dom/extend-expect'
test('tests', async () => {
const { getByTestId } = render(
<div data-testid='error'>something</div>
);
const something = await waitForElement(() => getByTestId('error'))
expect(something).toHaveTextContent('something')
})
What happened:
Reproduction:
Problem description:
The tests pass if I downgrade to:
"react": "16.8.1",
"react-dom": "16.8.1",,
"react-testing-library": "5.5.3",
"jest-dom": "3.0.0"
Suggested solution:
I'm starting the bisect from the versions to see what might be changed.