test: Fix --reload in integration_tests (#9345)

This commit removes redundant "--reload" args because "util::deno_cmd"
recreates "DENO_DIR". 

This commit also fixes ta_reload in integration tests to actually test reload.
This commit is contained in:
Yosi Pramajaya 2021-02-24 21:18:35 +07:00 committed by GitHub
parent 9cc7e32e37
commit f6a80f34d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 10 deletions

View file

@ -1151,11 +1151,15 @@ pub fn new_deno_dir() -> TempDir {
}
pub fn deno_cmd() -> Command {
let e = deno_exe_path();
let deno_dir = new_deno_dir();
deno_cmd_with_deno_dir(deno_dir.path())
}
pub fn deno_cmd_with_deno_dir(deno_dir: &std::path::Path) -> Command {
let e = deno_exe_path();
assert!(e.exists());
let mut c = Command::new(e);
c.env("DENO_DIR", deno_dir.path());
c.env("DENO_DIR", deno_dir);
c
}