From 84ef26ac9b5f0e1199d77837cd97cb203baa8729 Mon Sep 17 00:00:00 2001 From: Geert-Jan Zwiers Date: Sat, 7 Jan 2023 21:22:09 +0100 Subject: refactor(cli/tools): move flag and config logic to CliOptions (#17008) Co-authored-by: David Sherret --- cli/lsp/testing/execution.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cli/lsp/testing') diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index a498df857..28f15a7ce 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -35,6 +35,7 @@ use deno_runtime::tokio_util::run_local; use indexmap::IndexMap; use std::collections::HashMap; use std::collections::HashSet; +use std::num::NonZeroUsize; use std::sync::Arc; use std::time::Duration; use std::time::Instant; @@ -273,7 +274,13 @@ impl TestRun { let (concurrent_jobs, fail_fast) = if let DenoSubcommand::Test(test_flags) = ps.options.sub_command() { - (test_flags.concurrent_jobs.into(), test_flags.fail_fast) + ( + test_flags + .concurrent_jobs + .unwrap_or_else(|| NonZeroUsize::new(1).unwrap()) + .into(), + test_flags.fail_fast, + ) } else { unreachable!("Should always be Test subcommand."); }; -- cgit v1.2.3