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

feat(test): add default to --coverage option #21510

Merged
merged 1 commit into from Dec 8, 2023

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Dec 8, 2023

part of #21325

This PR adds default value to --coverage option. If a user only specifies --coverage, it uses coverage directory for coverage data output.

This aligns with the convention of existing JS coverage tooling ecosystem (jest and nyc use the same default directory)

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, while you are looking into these changes, could you verify that internal runtime code coverage is not being written to this directory - I have a feeling we write a lot of unnecessary files for users.

@kt3k
Copy link
Member Author

kt3k commented Dec 8, 2023

while you are looking into these changes, could you verify that internal runtime code coverage is not being written to this directory - I have a feeling we write a lot of unnecessary files for users.

Checked with coverage of std/path test case. The urls in json files are all users script's (in this case std source code).

There are multiple json files for a single url, and that causes a large number of json output files, but I think that is the expected behavior.

@kt3k kt3k merged commit 2b3daa6 into denoland:main Dec 8, 2023
14 checks passed
@kt3k kt3k deleted the coverage-default-dir branch December 8, 2023 08:35
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

Successfully merging this pull request may close these issues.

None yet

2 participants