Replies: 1 comment
-
For future readers, this was asked and answered in the Lit Discord server: https://discord.com/channels/1012791295170859069/1222114682752471050/1222114682752471050
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, community!
We've been developing web components and have successfully tested them in isolation using Web Test Runner.
Now, we're integrating these web components into a separate React project and are encountering challenges when attempting to test their functionality with Jest. Specifically, we're finding it difficult to access and test elements within the Shadow DOM, as Jest's testing utilities primarily allow interaction with the light DOM.
Could you provide guidance or recommend best practices for testing the functionality of web components (that utilize Shadow DOM) within a React application using Jest? Are there specific configurations, libraries, or techniques that facilitate testing in this scenario?
Any insights or examples would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions