You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run npm run test-ct (may give wrong results the first time, then run again)
To generate nyc output for code coverage report, run npx nyc report --reporter=text
Expected behavior
I expect it to collect coverage from the components in my-react-app too.
Actual behavior
It is collecting coverage only from the components inside the playwright project. I want it to collect coverage from other directories too.
Additional context
I have been tasked to run component tests on a component library which is internal to us. I want to have minimum interference with their projects and directory, so I cannot place tests inside the place where their components exist. I can do this at runtime for just tests, but that is a lot of grunt work and not an efficient workflow. The component tests work correctly, but I am not at all able to collect overage of the components that they have developed.
This wa, it only collects coverage from the wrapper-components-folder, instead of the Main-Components.
Changing the nyc config in the vite-pugin-istabul also has no effect.
I cannot upgrade node or npm to a version above the 16.20.2
Can you recommend me any way to do this ?
Version
1.50.0
Steps to reproduce
Expected behavior
I expect it to collect coverage from the components in my-react-app too.
Actual behavior
It is collecting coverage only from the components inside the playwright project. I want it to collect coverage from other directories too.
Additional context
I have been tasked to run component tests on a component library which is internal to us. I want to have minimum interference with their projects and directory, so I cannot place tests inside the place where their components exist. I can do this at runtime for just tests, but that is a lot of grunt work and not an efficient workflow. The component tests work correctly, but I am not at all able to collect overage of the components that they have developed.
I have followed the steps from the recommended repo https://github.com/mxschmitt/playwright-test-coverage/tree/ct-react-vite?tab=readme-ov-file#use-istanbul-coverage-collection-with-playwright-component-testing-react
The project uses react17 and @playwright/experimental-ct-react17.
This is what my project structure looks like:
This wa, it only collects coverage from the wrapper-components-folder, instead of the Main-Components.
Changing the nyc config in the vite-pugin-istabul also has no effect.
I cannot upgrade node or npm to a version above the 16.20.2
Can you recommend me any way to do this ?
Environment
System: OS: Linux 5.15 Amazon Linux 2 CPU: (4) x64 Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Container: Yes Binaries: Node: 16.20.2 Yarn: 1.22.22 npm: 8.19.4 npmPackages: @playwright/experimental-ct-react17: ^1.49.0 => 1.50.0
The text was updated successfully, but these errors were encountered: