From df26cfa1922969d8c4be53cfb36780902255d79d Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Thu, 28 Nov 2024 14:05:06 -0800 Subject: [PATCH] internal: Clean up tests. --- crates/action-graph/src/action_graph_builder.rs | 4 ++-- crates/action-graph/tests/action_graph_test.rs | 1 - crates/affected/tests/affected_tracker_test.rs | 2 -- crates/cli/tests/run_test.rs | 1 - crates/config/tests/inherited_tasks_config_test.rs | 1 - 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/action-graph/src/action_graph_builder.rs b/crates/action-graph/src/action_graph_builder.rs index 5e5483d381b..7922314c58c 100644 --- a/crates/action-graph/src/action_graph_builder.rs +++ b/crates/action-graph/src/action_graph_builder.rs @@ -43,7 +43,7 @@ pub struct ActionGraphBuilder<'app> { workspace_graph: &'app WorkspaceGraph, // Affected states - pub affected: Option>, + affected: Option>, touched_files: Option<&'app FxHashSet>, // Target tracking @@ -257,7 +257,7 @@ impl<'app> ActionGraphBuilder<'app> { reqs: &RunRequirements, config: Option<&TaskDependencyConfig>, ) -> miette::Result> { - // Create a new requirements object as we don't have our dependencies/ + // Create a new requirements object as we don't want our dependencies/ // dependents to check for affected or run their own dependents! let child_reqs = RunRequirements { ci: reqs.ci, diff --git a/crates/action-graph/tests/action_graph_test.rs b/crates/action-graph/tests/action_graph_test.rs index 453caeecea9..46a38a87c67 100644 --- a/crates/action-graph/tests/action_graph_test.rs +++ b/crates/action-graph/tests/action_graph_test.rs @@ -888,7 +888,6 @@ mod action_graph { mod affected { use super::*; use moon_affected::AffectedBy; - use moon_test_utils2::pretty_assertions::assert_eq; #[tokio::test] async fn doesnt_graph_if_not_affected_by_touched_files() { diff --git a/crates/affected/tests/affected_tracker_test.rs b/crates/affected/tests/affected_tracker_test.rs index 64a1e5ae771..b811540ab9d 100644 --- a/crates/affected/tests/affected_tracker_test.rs +++ b/crates/affected/tests/affected_tracker_test.rs @@ -201,8 +201,6 @@ mod affected_projects { #[tokio::test] async fn deep_cycle() { - use moon_test_utils2::pretty_assertions::assert_eq; - let workspace_graph = generate_workspace_graph("projects").await; let touched_files = FxHashSet::from_iter(["cycle-a/file.txt".into()]); diff --git a/crates/cli/tests/run_test.rs b/crates/cli/tests/run_test.rs index 2a08caa04c9..89507e2200f 100644 --- a/crates/cli/tests/run_test.rs +++ b/crates/cli/tests/run_test.rs @@ -1020,7 +1020,6 @@ mod outputs { mod hydration { use super::*; - use moon_test_utils::pretty_assertions::assert_eq; #[test] fn reuses_cache_from_previous_run() { diff --git a/crates/config/tests/inherited_tasks_config_test.rs b/crates/config/tests/inherited_tasks_config_test.rs index 6ec2f0cd815..bda4bad1fbf 100644 --- a/crates/config/tests/inherited_tasks_config_test.rs +++ b/crates/config/tests/inherited_tasks_config_test.rs @@ -1113,7 +1113,6 @@ mod task_manager { use moon_common::Id; use moon_config::*; use starbase_sandbox::locate_fixture; - use starbase_sandbox::pretty_assertions::assert_eq; #[test] fn loads_pkl() {