From 48ea42fcb4d223dc722c81d23e39a3fb9d16a14f Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Mon, 4 Nov 2024 15:43:03 -0700 Subject: [PATCH] test --- .../turborepo-repository/src/package_graph/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/turborepo-repository/src/package_graph/mod.rs b/crates/turborepo-repository/src/package_graph/mod.rs index e700af2e4a37a..cda4a05fe40ef 100644 --- a/crates/turborepo-repository/src/package_graph/mod.rs +++ b/crates/turborepo-repository/src/package_graph/mod.rs @@ -914,4 +914,17 @@ mod test { )) ); } + + #[tokio::test] + async fn test_does_not_require_name_for_root_package_json() { + let root = + AbsoluteSystemPathBuf::new(if cfg!(windows) { r"C:\repo" } else { "/repo" }).unwrap(); + let pkg_graph = PackageGraph::builder(&root, PackageJson::from_value(json!({})).unwrap()) + .with_package_discovery(MockDiscovery) + .build() + .await + .unwrap(); + + assert!(pkg_graph.validate().is_ok()); + } }