Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Nov 4, 2024
1 parent 99029e9 commit 48ea42f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/turborepo-repository/src/package_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 48ea42f

Please sign in to comment.