diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-09-04 17:16:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 17:16:46 -0400 |
commit | 9d62d77cfa98b5e741dbcf0c657b530fc2770b24 (patch) | |
tree | cefb3b701c4ccc08856cbd6f53ebcc33a829e883 /cli/file_fetcher.rs | |
parent | 82588ec09c199683cff88097e1b90649497239c7 (diff) |
Run tests after "cargo build" on travis (#2854)
Diffstat (limited to 'cli/file_fetcher.rs')
-rw-r--r-- | cli/file_fetcher.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index ae5454cd9..c062009a4 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -1262,9 +1262,13 @@ mod tests { let r = fetcher.fetch_source_file(&specifier); assert!(r.is_err()); - // Assuming cwd is the deno repo root. + let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .parent() + .unwrap() + .join("js/main.ts") + .to_owned(); let specifier = - ModuleSpecifier::resolve_url_or_path("js/main.ts").unwrap(); + ModuleSpecifier::resolve_url_or_path(p.to_str().unwrap()).unwrap(); let r = fetcher.fetch_source_file(&specifier); assert!(r.is_ok()); }) @@ -1282,9 +1286,13 @@ mod tests { let r = fetcher.fetch_source_file(&specifier); assert!(r.is_err()); - // Assuming cwd is the deno repo root. + let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .parent() + .unwrap() + .join("js/main.ts") + .to_owned(); let specifier = - ModuleSpecifier::resolve_url_or_path("js/main.ts").unwrap(); + ModuleSpecifier::resolve_url_or_path(p.to_str().unwrap()).unwrap(); let r = fetcher.fetch_source_file(&specifier); assert!(r.is_ok()); }) |