Skip to content

Commit

Permalink
chore: project root path detection feature
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelramos committed Nov 13, 2024
1 parent 9fbb4e8 commit a4d2e95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/standard/tests/std_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod paths_tests {

create_dir(&monorepo_root_dir)?;

let mut readme_file = File::create(monorepo_root_dir.join("package.json").as_path())?;
let mut readme_file = File::create(monorepo_root_dir.join("package-lock.json").as_path())?;
readme_file.write_all(b"{}")?;

#[cfg(not(windows))]
Expand All @@ -40,7 +40,11 @@ mod paths_tests {

remove_dir_all(root)?;

assert!(result.is_some());
let root = root.display().to_string();
let project_root = result.unwrap().display().to_string();

assert_eq!(root, project_root);

Ok(())
}
}

0 comments on commit a4d2e95

Please sign in to comment.