mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(cli/tools/test): Prefix test module paths with "./" (#14301)
This commit is contained in:
parent
5f2d9a4a22
commit
bd6494d119
38 changed files with 107 additions and 103 deletions
|
@ -253,10 +253,14 @@ impl PrettyTestReporter {
|
|||
fn to_relative_path_or_remote_url(&self, path_or_url: &str) -> String {
|
||||
let url = Url::parse(path_or_url).unwrap();
|
||||
if url.scheme() == "file" {
|
||||
self.cwd.make_relative(&url).unwrap()
|
||||
} else {
|
||||
path_or_url.to_string()
|
||||
if let Some(mut r) = self.cwd.make_relative(&url) {
|
||||
if !r.starts_with("../") {
|
||||
r = format!("./{}", r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
path_or_url.to_string()
|
||||
}
|
||||
|
||||
fn force_report_step_wait(&mut self, description: &TestStepDescription) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue