diff --git a/cli/src/test.rs b/cli/src/test.rs index 69c4a663..c531c18a 100644 --- a/cli/src/test.rs +++ b/cli/src/test.rs @@ -353,9 +353,18 @@ pub fn parse_tests(path: &Path) -> io::Result { let entry = entry?; let hidden = entry.file_name().to_str().unwrap_or("").starts_with("."); if !hidden { - children.push(parse_tests(&entry.path())?); + children.push(entry.path()); } } + children.sort_by(|a, b| { + a.file_name() + .unwrap_or_default() + .cmp(&b.file_name().unwrap_or_default()) + }); + let children = children + .iter() + .map(|path| parse_tests(path)) + .collect::>>()?; Ok(TestEntry::Group { name, children,