diff options
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 8b4fa445e..5d692cafc 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -86,6 +86,7 @@ pub struct CompletionsFlags { #[derive(Clone, Debug, Eq, PartialEq)] pub enum CoverageType { + Summary, Pretty, Lcov, Html, @@ -1414,6 +1415,12 @@ Generate html reports from lcov: .action(ArgAction::SetTrue), ) .arg( + Arg::new("pretty") + .long("pretty") + .help("Output coverage report in pretty format in the terminal.") + .action(ArgAction::SetTrue), + ) + .arg( Arg::new("files") .num_args(1..) .value_parser(value_parser!(PathBuf)) @@ -3320,8 +3327,10 @@ fn coverage_parse(flags: &mut Flags, matches: &mut ArgMatches) { CoverageType::Lcov } else if matches.get_flag("html") { CoverageType::Html - } else { + } else if matches.get_flag("pretty") { CoverageType::Pretty + } else { + CoverageType::Summary }; let output = matches.remove_one::<PathBuf>("output"); flags.subcommand = DenoSubcommand::Coverage(CoverageFlags { @@ -7908,7 +7917,7 @@ mod tests { output: None, include: vec![r"^file:".to_string()], exclude: vec![r"test\.(js|mjs|ts|jsx|tsx)$".to_string()], - r#type: CoverageType::Pretty + r#type: CoverageType::Summary }), ..Flags::default() } |