After updating the libraries @testing-library/react@testing-library/user-event to the new version (to follow the update of react 18) I'm experiencing an error while running my unit tests(as shown below):
I also tried to install babel-jest, but the error changed to a more abstract error message(as shown below):
master has a solution with the same packages but without tsdx
use-tsdx has a solution with the same packages but with tsdx
Expected behavior
Run the unit tests correctly while using styled-components and user-events to check for user interactions.
Suggested solution(s)
N/A
Additional context
I found this PR related with a workaround comment: https://github.com/jaredpalmer/tsdx/pull/679, but doesn't quite work for me on the real codebase(it throws a lot of errors related to DOM finding) and it's from 2021, I would like to know if we have a more official solution.
Current Behavior
After updating the libraries
@testing-library/react
@testing-library/user-event
to the new version (to follow the update ofreact
18) I'm experiencing an error while running my unit tests(as shown below):I also tried to install
babel-jest
, but the error changed to a more abstract error message(as shown below):Expected behavior
Run the unit tests correctly while using styled-components and user-events to check for user interactions.
Suggested solution(s)
N/A
Additional context
I found this PR related with a workaround comment: https://github.com/jaredpalmer/tsdx/pull/679, but doesn't quite work for me on the real codebase(it throws a lot of errors related to DOM finding) and it's from 2021, I would like to know if we have a more official solution.
Your environment