Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: NYC Code Coverage Path Mapping for Shared Libraries #1573

Open
Harcsa95 opened this issue Jul 2, 2024 · 0 comments
Open

Question: NYC Code Coverage Path Mapping for Shared Libraries #1573

Harcsa95 opened this issue Jul 2, 2024 · 0 comments

Comments

@Harcsa95
Copy link

Harcsa95 commented Jul 2, 2024

I'm currently working on a project that includes two applications, appA and appB, and a shared-library where I store common code between these two applications. The directory structure of the shared library is as follows:
app/shared-library/src/my/library

When I generate code coverage for the shared library from appA, the source file paths in the coverage report are prefixed with .nyc_output/sources/resources/, like so:
SF:.nyc_output/sources/resources/my/library/components/ComponentA.js
However, when generating coverage for appA, the paths are not prefixed, I have appA, in which I have webapp folder, which contains my ui code, and the coverage path is the following:
SF:webapp/components/ComponentB.js

This inconsistency in path prefixes makes it difficult to aggregate and compare coverage reports across the applications and the shared library.

I'm looking for a way to pass a parameter to NYC to map or alias the path .nyc_output/sources/resources/my/library/components to shared-library/src/my/library in the coverage report. This would make the paths consistent and easier to work with.

Is there a current feature that supports this? If not, could this be considered for a future enhancement? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant