1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 21:50:00 -05:00

fix(test): sort file module specifiers (#11656)

This commit is contained in:
Casper Beyer 2021-08-12 18:09:35 +08:00 committed by GitHub
parent bb6473f3c2
commit 87d69d55ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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![