Skip to content

Commit

Permalink
fix(tests): files() function of traverse workspace (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
max397574 authored Mar 2, 2023
1 parent 352039b commit 92d6639
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/workspace_traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::path::PathBuf;
impl Workspace {
pub fn files(&self) -> Vec<PathBuf> {
walkdir::WalkDir::new(&self.path)
.min_depth(1)
.into_iter()
.filter(|e| {
e.is_ok()
Expand All @@ -25,14 +26,14 @@ mod tests {
use super::*;

#[test]
// TODO: Tests be failing 😭
fn test_files() {
let workspace = Workspace {
name: "example workspace".to_string(),
path: PathBuf::from("test/example_workspace"),
};

let files = workspace.files();
println!("{files:#?}");
assert_eq!(files.len(), 2);
}
}

0 comments on commit 92d6639

Please sign in to comment.