Skip to content

Is there any doc to write test for React component wrapping web components #453

Closed Answered by capricorn86
ajasingh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ajasingh! 🙂

I don't know of any guide for this.

I worked in a project that was a library of web components and many of the consumers used React. We generated the wrappers for React by using the TS compiler to analyze the web component source code, but I guess it would be possible to just use Regexp for it as well. The unit tests tested the web components directly and we only had a small integration test to verify that the React wrappers worked.

Another approach if done manually could be to test web components and React separately as the React component and web component can be considered as separate "units".

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by capricorn86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants