From 9d57a4aaeb18461bbeeea30fc8ab8804357185c1 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Sat, 10 Jul 2021 07:29:18 +0800 Subject: feat(cli/tools/test_runner): add terse reporter (#11156) This commit adds "--terse" flag to "deno test" that makes testing reporter output one character per test case instead of one line per case. This is an unstable feature. --- cli/flags.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cli/flags.rs') diff --git a/cli/flags.rs b/cli/flags.rs index 400798cbd..2d71762ce 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -100,6 +100,7 @@ pub enum DenoSubcommand { no_run: bool, fail_fast: bool, quiet: bool, + terse: bool, allow_none: bool, include: Option>, filter: Option, @@ -1010,6 +1011,11 @@ fn test_subcommand<'a, 'b>() -> App<'a, 'b> { .help("Don't return error code if no test files are found") .takes_value(false), ) + .arg( + Arg::with_name("terse") + .long("terse") + .help("UNSTABLE: Display one character per test instead of one line"), + ) .arg( Arg::with_name("filter") .set(ArgSettings::AllowLeadingHyphen) @@ -1699,6 +1705,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { let fail_fast = matches.is_present("fail-fast"); let allow_none = matches.is_present("allow-none"); let quiet = matches.is_present("quiet"); + let terse = matches.is_present("terse"); let filter = matches.value_of("filter").map(String::from); let shuffle = if matches.is_present("shuffle") { @@ -1753,6 +1760,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { doc, fail_fast, quiet, + terse, include, filter, shuffle, @@ -3391,6 +3399,7 @@ mod tests { filter: Some("- foo".to_string()), allow_none: true, quiet: false, + terse: false, include: Some(svec!["dir1/", "dir2/"]), shuffle: None, concurrent_jobs: 1, -- cgit v1.2.3