mxschmitt / playwright-test-coverage

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

Can we do test coverage for component testing? #25

Closed aniketicloud closed 3 months ago

aniketicloud commented 5 months ago

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

mxschmitt commented 5 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 3 months 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