From 15a763152f9d392cb80692262f8de5ef8ae15495 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 11 Aug 2021 10:20:47 -0400 Subject: chore: move test files to testdata directory (#11601) --- cli/lsp/sources.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cli/lsp') 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); -- cgit v1.2.3