diff --git a/crates/turbopack-tests/tests/snapshot.rs b/crates/turbopack-tests/tests/snapshot.rs index f34b993c8fb01..cdb70f3aaa463 100644 --- a/crates/turbopack-tests/tests/snapshot.rs +++ b/crates/turbopack-tests/tests/snapshot.rs @@ -162,7 +162,7 @@ async fn run(resource: PathBuf) -> Result<()> { #[turbo_tasks::function] async fn run_test(resource: String) -> Result> { - let test_path = Path::new(&resource); + let test_path = canonicalize(Path::new(&resource))?; assert!(test_path.exists(), "{} does not exist", resource); assert!( test_path.is_dir(), diff --git a/crates/turbopack-tests/tests/util.rs b/crates/turbopack-tests/tests/util.rs index bf2545da0e699..6723b8e7f6c93 100644 --- a/crates/turbopack-tests/tests/util.rs +++ b/crates/turbopack-tests/tests/util.rs @@ -1,5 +1,6 @@ -use std::{fs::canonicalize, path::PathBuf}; +use std::path::PathBuf; +use dunce::canonicalize; use once_cell::sync::Lazy; /// The turbo repo root. Should be used as the root when building with turbopack