summaryrefslogtreecommitdiff
path: root/cli/tests/integration/repl_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r--cli/tests/integration/repl_tests.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index 5e3610842..efbde55c3 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -604,21 +604,22 @@ fn lexical_scoped_variable() {
#[test]
fn missing_deno_dir() {
use std::fs::read_dir;
- use std::fs::remove_dir_all;
- const DENO_DIR: &str = "nonexistent";
- let test_deno_dir = test_util::testdata_path().join(DENO_DIR);
+ let temp_dir = TempDir::new();
+ let deno_dir_path = temp_dir.path().join("deno");
let (out, err) = util::run_and_collect_output(
true,
"repl",
Some(vec!["1"]),
Some(vec![
- ("DENO_DIR".to_owned(), DENO_DIR.to_owned()),
+ (
+ "DENO_DIR".to_owned(),
+ deno_dir_path.to_str().unwrap().to_owned(),
+ ),
("NO_COLOR".to_owned(), "1".to_owned()),
]),
false,
);
- assert!(read_dir(&test_deno_dir).is_ok());
- remove_dir_all(&test_deno_dir).unwrap();
+ assert!(read_dir(deno_dir_path).is_ok());
assert_ends_with!(out, "1\n");
assert!(err.is_empty());
}