diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-08-12 18:09:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 12:09:35 +0200 |
commit | 87d69d55cadc4fed99ebbcba1adeb1f26d32ff87 (patch) | |
tree | 8c0b1d3e2f7695f447c128a626566d9201a87fd0 /cli | |
parent | bb6473f3c293b3c7f4c7c60628a0182c04f78254 (diff) |
fix(test): sort file module specifiers (#11656)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/tools/test_runner.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/tools/test_runner.rs b/cli/tools/test_runner.rs index b0cf0c845..9e5489bf7 100644 --- a/cli/tools/test_runner.rs +++ b/cli/tools/test_runner.rs @@ -243,10 +243,12 @@ where let p = normalize_path(&root_path.join(path)); if p.is_dir() { let test_files = collect_files(&[p], &[], &predicate).unwrap(); - let test_files_as_urls = test_files + let mut test_files_as_urls = test_files .iter() .map(|f| Url::from_file_path(f).unwrap()) .collect::<Vec<Url>>(); + + test_files_as_urls.sort(); prepared.extend(test_files_as_urls); } else { let url = Url::from_file_path(p).unwrap(); @@ -766,13 +768,13 @@ mod tests { .join("std") .join("http"); println!("root {:?}", root); - let mut matched_urls = collect_test_module_specifiers( + let matched_urls = collect_test_module_specifiers( vec![".".to_string()], &root, is_supported, ) .unwrap(); - matched_urls.sort(); + let root_url = Url::from_file_path(root).unwrap().to_string(); println!("root_url {}", root_url); let expected: Vec<Url> = vec![ |