diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2023-12-12 12:42:57 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 12:42:57 +0900 |
commit | 5ddf8732f089c93667a667155cd923250d723758 (patch) | |
tree | 4fc307e939c341d88e8013a0d8aed48360816fed /cli/args/flags.rs | |
parent | a4f45f709278208cb61501df2792412f11aed3c4 (diff) |
feat(coverage): add summary reporter (#21535)
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() } |