playwright-test-coverage icon indicating copy to clipboard operation
playwright-test-coverage copied to clipboard

Can we do test coverage for component testing?

Open aniketicloud opened this issue 1 year ago • 1 comments

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

aniketicloud avatar Jun 29 '24 13:06 aniketicloud

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.

mxschmitt avatar Jul 01 '24 08:07 mxschmitt

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

aniketicloud avatar Aug 10 '24 07:08 aniketicloud