diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-05-11 07:54:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 01:54:39 +0200 |
commit | 36c5461129a1b769eb205765a79c5dc000b0b2f6 (patch) | |
tree | eec51ab5f8419acaa5adf7fe84319e9773dec26c /cli/flags.rs | |
parent | c44e53a5b6bd8d995ddc32a0ba13d20bf4e70818 (diff) |
feat(test): add support for type checking documentation (#10521)
This commit adds support for type checking codeblocks in the JS doc
comments.
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 6f23afba1..3b49d6b59 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -96,6 +96,7 @@ pub enum DenoSubcommand { script: String, }, Test { + doc: bool, no_run: bool, fail_fast: bool, quiet: bool, @@ -985,6 +986,12 @@ fn test_subcommand<'a, 'b>() -> App<'a, 'b> { .takes_value(false), ) .arg( + Arg::with_name("doc") + .long("doc") + .help("UNSTABLE: type check code blocks") + .takes_value(false), + ) + .arg( Arg::with_name("fail-fast") .long("fail-fast") .alias("failfast") @@ -1667,6 +1674,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { runtime_args_parse(flags, matches, true, true); let no_run = matches.is_present("no-run"); + let doc = matches.is_present("doc"); let fail_fast = matches.is_present("fail-fast"); let allow_none = matches.is_present("allow-none"); let quiet = matches.is_present("quiet"); @@ -1711,6 +1719,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { flags.coverage_dir = matches.value_of("coverage").map(String::from); flags.subcommand = DenoSubcommand::Test { no_run, + doc, fail_fast, quiet, include, @@ -3357,6 +3366,7 @@ mod tests { Flags { subcommand: DenoSubcommand::Test { no_run: true, + doc: false, fail_fast: false, filter: Some("- foo".to_string()), allow_none: true, |