summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-08-11 10:20:47 -0400
committerGitHub <noreply@github.com>2021-08-11 10:20:47 -0400
commit15a763152f9d392cb80692262f8de5ef8ae15495 (patch)
treefcd1a59777f95920bf3502519983d6cc0d882a9a /runtime/worker.rs
parenta0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (diff)
chore: move test files to testdata directory (#11601)
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 8057e38f1..b200ef08e 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -329,10 +329,7 @@ mod tests {
#[tokio::test]
async fn execute_mod_esm_imports_a() {
- let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
- .parent()
- .unwrap()
- .join("cli/tests/esm_imports_a.js");
+ let p = test_util::testdata_path().join("esm_imports_a.js");
let module_specifier = resolve_url_or_path(&p.to_string_lossy()).unwrap();
let mut worker = create_test_worker();
let result = worker.execute_module(&module_specifier).await;
@@ -375,10 +372,7 @@ mod tests {
// This assumes cwd is project root (an assumption made throughout the
// tests).
let mut worker = create_test_worker();
- let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
- .parent()
- .unwrap()
- .join("cli/tests/001_hello.js");
+ let p = test_util::testdata_path().join("001_hello.js");
let module_specifier = resolve_url_or_path(&p.to_string_lossy()).unwrap();
let result = worker.execute_module(&module_specifier).await;
assert!(result.is_ok());