E2E coverage
Currently
E2E covers just two cases
- single-component-with-state
- two components, one using the other
Goal
Add more cases, to gradually cover all Mitosis features. Thus the E2E tests would measure (and eventually verify) Mitosis feature/target coverage.
What if we added a test suite that did something akin to:
- Generate X framework component from Mitosis
- Ran TestingLibrary (or similar) over the compiled output of X to verify its functionality
That way, we knew that the X framework compiled output actually did something in relation to the expected functionality?
We already do this with:
- snapshots: in
packages/core/src/__tests__/test-generator.ts, we generate snapshots for every output - e2e tests: in
e2e/e2e-app/src, we run e2e tests for every output
Adding a testing library to test rendering would require more code generation and problem-solving that I don't think is worth the pain. We should primarily focus on adding more e2e tests, as that's the best way to make sure we test functionality across the board.