mxschmitt / playwright-test-coverage

Playwright Test (@playwright/test) demo to collect coverage information via Istanbul
MIT License
107 stars 16 forks source link

Can we do test coverage for component testing? #25

Closed aniketicloud closed 4 weeks ago

aniketicloud commented 2 months ago

Just like Vitest/Jest, can we do a code coverage in component testing in Playwright?

mxschmitt commented 2 months ago

In theory, the same concept of this repository can be applied to component testing. This would require adjusting the ctViteConfig to include the coverage plugin and collect it.

aniketicloud commented 4 weeks ago

Thank you for adding the component testing coverage example. It is in ct-react-vite branch. https://github.com/mxschmitt/playwright-test-coverage/tree/ct-react-vite