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/tsc.rs | |
| parent | a0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (diff) | |
chore: move test files to testdata directory (#11601)
Diffstat (limited to 'cli/tsc.rs')
| -rw-r--r-- | cli/tsc.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs index b355c12fa..57bbeeca3 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -596,8 +596,6 @@ mod tests { use crate::module_graph::tests::MockSpecifierHandler; use crate::module_graph::GraphBuilder; use deno_core::parking_lot::Mutex; - use std::env; - use std::path::PathBuf; async fn setup( maybe_specifier: Option<ModuleSpecifier>, @@ -607,8 +605,7 @@ mod tests { let specifier = maybe_specifier .unwrap_or_else(|| resolve_url_or_path("file:///main.ts").unwrap()); let hash_data = maybe_hash_data.unwrap_or_else(|| vec![b"".to_vec()]); - let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); - let fixtures = c.join("tests/tsc2"); + let fixtures = test_util::testdata_path().join("tsc2"); let handler = Arc::new(Mutex::new(MockSpecifierHandler { fixtures, ..MockSpecifierHandler::default() @@ -633,8 +630,7 @@ mod tests { specifier: &ModuleSpecifier, ) -> Result<Response, AnyError> { let hash_data = vec![b"something".to_vec()]; - let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); - let fixtures = c.join("tests/tsc2"); + let fixtures = test_util::testdata_path().join("tsc2"); let handler = Arc::new(Mutex::new(MockSpecifierHandler { fixtures, ..Default::default() |
