Open nareshbhatia opened 2 years ago
Add the following line to your tsconfig.json
"skipLibCheck": true,
Works for me.
We're also running into this and prevents us from using the Storybook interaction tests, since they're depending on React Testing Library (and React).
Using skipLibCheck
could work but we'd rather not turn it on because we like to have our Node modules checked.
Still an issue :)
This issue has been labeled as help wanted
. This label is added to issues that we believe would be good for contributors.
If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. Thank you!
Prerequisites
Stencil Version
2.16.1
Stencil Framework Output Target
React
Stencil Framework Output Target Version
0.3.1
Current Behavior
Jest errors out if I try to use the latest version of react-testing-libray@13.3.0:
Expected Behavior
We should be able to use stencil with latest version of react-testing library (v13; or at least v12 if not supporting React 18 yet).
Steps to Reproduce
Please see my monorepo here. The last commit fixes the issue by removing react-testing-library completely. (It also downgrades from React v18 to React v17, but that's just because I understand that Stencil does not support React v18 yet.)
For the commit before that you just need to run
npm run dev
to see the errors mentioned above.Code Reproduction URL
https://github.com/nareshbhatia/stencil-demo
Additional Information
I notice that react-output-target is using a very old version of react-testing-library (v7):
https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/package.json#L43