summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-11-22 14:40:33 +0000
committerGitHub <noreply@github.com>2020-11-22 15:40:33 +0100
commit7405356e23cc20b69e0f5d4313110d7780665f2b (patch)
tree926d041e1fbc544dd82946659d4b601f31113890
parent2c00f6c5482e024745378b61b654d9b524ab6f08 (diff)
chore(cli/flags): Rename --failfast to --fail-fast (#8456)
-rw-r--r--cli/flags.rs9
-rw-r--r--cli/tests/integration_tests.rs2
-rw-r--r--docs/testing.md4
3 files changed, 8 insertions, 7 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index 5c87e89f1..8cfa45e08 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -574,7 +574,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
runtime_args_parse(flags, matches, true);
let no_run = matches.is_present("no-run");
- let failfast = matches.is_present("failfast");
+ let fail_fast = matches.is_present("fail-fast");
let allow_none = matches.is_present("allow-none");
let quiet = matches.is_present("quiet");
let filter = matches.value_of("filter").map(String::from);
@@ -609,7 +609,7 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
flags.subcommand = DenoSubcommand::Test {
no_run,
- fail_fast: failfast,
+ fail_fast,
quiet,
include,
filter,
@@ -1158,8 +1158,9 @@ fn test_subcommand<'a, 'b>() -> App<'a, 'b> {
.requires("unstable"),
)
.arg(
- Arg::with_name("failfast")
- .long("failfast")
+ Arg::with_name("fail-fast")
+ .long("fail-fast")
+ .alias("failfast")
.help("Stop on first error")
.takes_value(false),
)
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 17b9fbc1b..390b7b72a 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -1887,7 +1887,7 @@ itest!(deno_test {
});
itest!(deno_test_fail_fast {
- args: "test --failfast test_runner_test.ts",
+ args: "test --fail-fast test_runner_test.ts",
exit_code: 1,
output: "deno_test_fail_fast.out",
});
diff --git a/docs/testing.md b/docs/testing.md
index b075bbca3..8fc180244 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -199,10 +199,10 @@ Deno.test({
## Failing fast
If you have a long running test suite and wish for it to stop on the first
-failure, you can specify the `--failfast` flag when running the suite.
+failure, you can specify the `--fail-fast` flag when running the suite.
```shell
-deno test --failfast
+deno test --fail-fast
```
## Test coverage