diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-10 11:09:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 11:09:45 -0400 |
commit | 7f15126f23d97f20a4fb33e43136cd4d13825863 (patch) | |
tree | 85d77389969b31999680059e65954a9fa863758e /cli/tests/integration/cache_tests.rs | |
parent | f3326eebd6af2aaca1543e8cb543a7b16762bc96 (diff) |
chore(tests): test_util - Add `PathRef` (#19450)
This adds a new `PathRef` struct to test_util for making it easier to
work with paths in test code. I'm going to expand on this more in the
future.
Diffstat (limited to 'cli/tests/integration/cache_tests.rs')
-rw-r--r-- | cli/tests/integration/cache_tests.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/tests/integration/cache_tests.rs b/cli/tests/integration/cache_tests.rs index e8449ca05..3d387f15e 100644 --- a/cli/tests/integration/cache_tests.rs +++ b/cli/tests/integration/cache_tests.rs @@ -61,13 +61,11 @@ fn relative_home_dir() { use test_util as util; use test_util::TempDir; - let deno_dir = TempDir::new_in(&util::testdata_path()); - let path = deno_dir.path().strip_prefix(util::testdata_path()).unwrap(); - + let deno_dir = TempDir::new(); let mut deno_cmd = util::deno_cmd(); let output = deno_cmd .current_dir(util::testdata_path()) - .env("XDG_CACHE_HOME", path) + .env("XDG_CACHE_HOME", deno_dir.path()) .env_remove("HOME") .env_remove("DENO_DIR") .arg("cache") |