-
Notifications
You must be signed in to change notification settings - Fork 18
Description
System info
● Playwright Version: [v1.31.2]
● Operating System: [macOS 12.0.1 MacBook Pro M1.]
● Browser: [Chromium]
● Other info: i am using the official recommended code coverage instrumentation library, playwright-test-coverage you can see it in (microsoft/playwright#7030)
Source code
(https://github.com/xiamingwei/umi-e2e-test/blob/main/e2e/index.spec.ts)
I will provide a minimal repository to reproduce this issue
Steps
tnpm i
tnpm run e2e
npx nyc --all report --reporter=html --reporter=json-summary --reporter=json
Expected
in the index.html file located in the generated coverage folder,All files in the application should be displayed, but only the files covered by the test cases are shown. because i also have other modules like Home.tsx,Detail.tsx etc...


Actual

In fact, only the files mentioned in the test cases are displayed,this will cause a phenomenon that when I add test cases for other pages, the new test cases will also be included in the coverage report, leading to a decrease in the original coverage rate.