summaryrefslogtreecommitdiff
path: root/cli/tools/test/mod.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-23 19:00:48 -0400
committerGitHub <noreply@github.com>2024-07-23 19:00:48 -0400
commit9114a2df69da9318c4e10887553b7daf77b0fa16 (patch)
tree2309817e74485f9fe8f7b79238afa026070b79df /cli/tools/test/mod.rs
parent6055629ee7f48a4e887392ccac13788aa4008249 (diff)
fix(upgrade): do not error if config in cwd invalid (#24689)
``` > deno upgrade error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile. V:\scratch > V:\deno\target\debug\deno upgrade Looking up latest version Local deno version 1.45.3 is the most recent release ``` Closes #24517 Closes #20729
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r--cli/tools/test/mod.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 587b737d6..904b9ecb7 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -7,7 +7,6 @@ use crate::args::TestReporterConfig;
use crate::colors;
use crate::display;
use crate::factory::CliFactory;
-use crate::factory::CliFactoryBuilder;
use crate::file_fetcher::File;
use crate::file_fetcher::FileFetcher;
use crate::graph_container::MainModuleGraphContainer;
@@ -1738,11 +1737,11 @@ async fn fetch_specifiers_with_test_mode(
}
pub async fn run_tests(
- flags: Flags,
+ flags: Arc<Flags>,
test_flags: TestFlags,
) -> Result<(), AnyError> {
- let factory = CliFactory::from_flags(flags)?;
- let cli_options = factory.cli_options();
+ let factory = CliFactory::from_flags(flags);
+ let cli_options = factory.cli_options()?;
let workspace_test_options =
cli_options.resolve_workspace_test_options(&test_flags);
let file_fetcher = factory.file_fetcher()?;
@@ -1821,7 +1820,7 @@ pub async fn run_tests(
}
pub async fn run_tests_with_watch(
- flags: Flags,
+ flags: Arc<Flags>,
test_flags: TestFlags,
) -> Result<(), AnyError> {
// On top of the sigint handlers which are added and unbound for each test
@@ -1850,9 +1849,11 @@ pub async fn run_tests_with_watch(
move |flags, watcher_communicator, changed_paths| {
let test_flags = test_flags.clone();
Ok(async move {
- let factory = CliFactoryBuilder::new()
- .build_from_flags_for_watcher(flags, watcher_communicator.clone())?;
- let cli_options = factory.cli_options();
+ let factory = CliFactory::from_flags_for_watcher(
+ flags,
+ watcher_communicator.clone(),
+ );
+ let cli_options = factory.cli_options()?;
let workspace_test_options =
cli_options.resolve_workspace_test_options(&test_flags);