diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-08-11 10:20:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 10:20:47 -0400 |
commit | 15a763152f9d392cb80692262f8de5ef8ae15495 (patch) | |
tree | fcd1a59777f95920bf3502519983d6cc0d882a9a /cli/lsp/sources.rs | |
parent | a0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (diff) |
chore: move test files to testdata directory (#11601)
Diffstat (limited to 'cli/lsp/sources.rs')
-rw-r--r-- | cli/lsp/sources.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cli/lsp/sources.rs b/cli/lsp/sources.rs index 8be1420d4..a3f0ae750 100644 --- a/cli/lsp/sources.rs +++ b/cli/lsp/sources.rs @@ -575,7 +575,6 @@ mod tests { use deno_core::resolve_path; use deno_core::resolve_url; use deno_core::serde_json::json; - use std::env; use tempfile::TempDir; fn setup() -> (Sources, PathBuf) { @@ -588,8 +587,7 @@ mod tests { #[test] fn test_sources_get_script_version() { let (sources, _) = setup(); - let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); - let tests = c.join("tests"); + let tests = test_util::testdata_path(); let specifier = resolve_path(&tests.join("001_hello.js").to_string_lossy()).unwrap(); let actual = sources.get_script_version(&specifier); @@ -599,8 +597,7 @@ mod tests { #[test] fn test_sources_get_text() { let (sources, _) = setup(); - let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); - let tests = c.join("tests"); + let tests = test_util::testdata_path(); let specifier = resolve_path(&tests.join("001_hello.js").to_string_lossy()).unwrap(); let actual = sources.get_source(&specifier); |