-
Notifications
You must be signed in to change notification settings - Fork 5.6k
feat(cli): add --coverage
flag to deno run
command
#29329
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
base: main
Are you sure you want to change the base?
Conversation
cli/args/flags.rs
Outdated
.conflicts_with("inspect-wait") | ||
.conflicts_with("inspect-brk") | ||
.help(cstr!("Collect coverage profile data into DIR. If DIR is not specified, it uses 'coverage/'. | ||
<p(245)>This option can also be set via the DENO_UNSTABLE_COVERAGE_DIR environment variable.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be DENO_COVERAGE_DIR
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally made this DENO_UNSTABLE_COVERAGE_DIR
at this point to avoid causing child process generating the coverage immediately after landing this PR.
I assume we would change this to DENO_COVERAGE_DIR
when we stabilize this feature (at that point the child process start generating coverage data. I think that should happen at next minor version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
deno run
commanddeno run
command
Discussed with @bartlomieju, and changed this to stable feature, targeting the next minor version. |
deno run
command--coverage
flag to deno run
command
closes #16440
This PR adds
--coverage
flag todeno run
command. When the flag is specified, it generates the coverage profile in the directory specified (default iscoverage
). The coverage directory can also be specified from the env varDENO_COVERAGE_DIR
.