-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Labels
Description
react-testing-library
version: 9.2.0react
version: 16.9.5node
version: 12.6.0yarn
version: 1.19.0
Relevant code or config:
What you did:
Upgraded from version 9.1.4 to 9.2.0.
What happened:
Some of our tests which are using the "wait*" utilities provided by the library are running into jest timeout after the upgrade. In some cases waiting for a dom element to appear takes 7-8x times more (~3 seconds) as before with version 9.1.4.
Reproduction:
I've created a simple example to reproduce the problem although with this example the difference is not so critical as in our application.
https://codesandbox.io/s/rtl-wait-slow-g7c21
Steps to reproduce:
- Run the tests and check out the results in the console (average time for waiting for select.options elements to appear 40-60ms)
- Switch the rtl version to 9.2.0
- Run the tests and check out the results again (2-3 times slower) (average time for waiting for select.options elements to appear 110-150ms)
Any help is appreciated.
Problem description:
Suggested solution:
eps1lon