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
The generated coverage JSON has consistent file path delimiters.
Observed Behavior
The generated coverage JSON has inconsistent file path delimiters.
Sometimes it uses a forward slash and sometimes it uses a double backslash. This becomes a problem when attempting to merge reports as coverage is not calculated cumulatively when the file paths do not match between reports.
Troubleshooting steps
You will see in the repo that I am attempting to merge component and e2e test coverage reports (via npm run test:coverage), both generated by Cypress. I am not saying the file path delimiters differ for component and e2e tests. I'm saying the generated JSON coverage will use different file path delimiters for the same file when re-running the same test type (component or e2e) without any other changes. For example, run npm run test:component and sometimes you will get...
Re-run npm run test:component without making any changes and the next time you might get...
Note: I am on a company-issued Windows 10 Enterprise machine.
The bug still occurs when I put cache: false in my nyc config.
Link to bug demonstration repository
https://github.com/david-kirkland/ng18-code-coverage/tree/bug-nyc-file-paths
Branch =
bug-nyc-file-paths
Expected Behavior
The generated coverage JSON has consistent file path delimiters.
Observed Behavior
The generated coverage JSON has inconsistent file path delimiters.
Sometimes it uses a forward slash and sometimes it uses a double backslash. This becomes a problem when attempting to merge reports as coverage is not calculated cumulatively when the file paths do not match between reports.
Troubleshooting steps
You will see in the repo that I am attempting to merge component and e2e test coverage reports (via
npm run test:coverage
), both generated by Cypress. I am not saying the file path delimiters differ for component and e2e tests. I'm saying the generated JSON coverage will use different file path delimiters for the same file when re-running the same test type (component or e2e) without any other changes. For example, runnpm run test:component
and sometimes you will get...Re-run
npm run test:component
without making any changes and the next time you might get...Note: I am on a company-issued Windows 10 Enterprise machine.
cache: false
in my nyc config.Environment Information
The text was updated successfully, but these errors were encountered: