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

fix(coverage): rename --pretty to --detailed #21543

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub struct CompletionsFlags {
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum CoverageType {
Summary,
Pretty,
Detailed,
Lcov,
Html,
}
Expand Down Expand Up @@ -1415,9 +1415,9 @@ Generate html reports from lcov:
.action(ArgAction::SetTrue),
)
.arg(
Arg::new("pretty")
.long("pretty")
.help("Output coverage report in pretty format in the terminal.")
Arg::new("detailed")
.long("detailed")
.help("Output coverage report in detailed format in the terminal.")
.action(ArgAction::SetTrue),
)
.arg(
Expand Down Expand Up @@ -3327,8 +3327,8 @@ fn coverage_parse(flags: &mut Flags, matches: &mut ArgMatches) {
CoverageType::Lcov
} else if matches.get_flag("html") {
CoverageType::Html
} else if matches.get_flag("pretty") {
CoverageType::Pretty
} else if matches.get_flag("detailed") {
CoverageType::Detailed
} else {
CoverageType::Summary
};
Expand Down
12 changes: 6 additions & 6 deletions cli/tests/integration/coverage_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn run_coverage_text(test_name: &str, extension: &str) {
.new_command()
.args_vec(vec![
"coverage".to_string(),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.split_output()
Expand Down Expand Up @@ -190,7 +190,7 @@ fn multifile_coverage() {
.new_command()
.args_vec(vec![
"coverage".to_string(),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.split_output()
Expand Down Expand Up @@ -263,7 +263,7 @@ fn no_snaps_included(test_name: &str, extension: &str) {
.args_vec(vec![
"coverage".to_string(),
"--include=no_snaps_included.ts".to_string(),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.split_output()
Expand Down Expand Up @@ -312,7 +312,7 @@ fn no_tests_included(test_name: &str, extension: &str) {
.args_vec(vec![
"coverage".to_string(),
format!("--exclude={}", util::std_path().canonicalize()),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.split_output()
Expand Down Expand Up @@ -362,7 +362,7 @@ fn no_npm_cache_coverage() {
.new_command()
.args_vec(vec![
"coverage".to_string(),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.split_output()
Expand Down Expand Up @@ -411,7 +411,7 @@ fn no_transpiled_lines() {
.args_vec(vec![
"coverage".to_string(),
"--include=no_transpiled_lines/index.ts".to_string(),
"--pretty".to_string(),
"--detailed".to_string(),
format!("{}/", tempdir),
])
.run();
Expand Down
12 changes: 6 additions & 6 deletions cli/tools/coverage/reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn create(kind: CoverageType) -> Box<dyn CoverageReporter + Send> {
match kind {
CoverageType::Summary => Box::new(SummaryCoverageReporter::new()),
CoverageType::Lcov => Box::new(LcovCoverageReporter::new()),
CoverageType::Pretty => Box::new(PrettyCoverageReporter::new()),
CoverageType::Detailed => Box::new(DetailedCoverageReporter::new()),
CoverageType::Html => Box::new(HtmlCoverageReporter::new()),
}
}
Expand Down Expand Up @@ -304,15 +304,15 @@ impl CoverageReporter for LcovCoverageReporter {
}
}

struct PrettyCoverageReporter {}
struct DetailedCoverageReporter {}

impl PrettyCoverageReporter {
pub fn new() -> PrettyCoverageReporter {
PrettyCoverageReporter {}
impl DetailedCoverageReporter {
pub fn new() -> DetailedCoverageReporter {
DetailedCoverageReporter {}
}
}

impl CoverageReporter for PrettyCoverageReporter {
impl CoverageReporter for DetailedCoverageReporter {
fn report(
&mut self,
coverage_report: &CoverageReport,
Expand Down