How to test a mitosis component ?
jeco123 opened this issue · 1 comments
jeco123 commented
I am interested in helping provide a feature!
Yes
Which generators are impacted?
- All
- Angular
- HTML
- Qwik
- React
- React-Native
- Solid
- Stencil
- Svelte
- Vue
- Web components
What problem does this feature solve?
I would like to develop my components using the TDD approach. It is necessary for me to have a test environement that can interpret a "mitosis component" in order to implement a test first and implement the code at a second time.
What does the proposed API look like?
I like the Stencil approach with their test environment.
Could be great to develop this kind of stuff.
Additional Information
No response
samijaber commented
Right now, the most useful way to test a mitosis component is to:
- pick one of the generated outputs (e.g. Qwik)
- import it into a webapp (e.g. a Qwikcity app)
- run integration tests on that (e.g. using playwright)
At Builder, we have a playwright integration tests suite that runs in parallel against multiple servers, each importing a different Mitosis output.