diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-08-17 22:58:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 22:58:41 -0400 |
commit | 480cfda8d5a5560fe0cc3ac2d9a3b798bf23f060 (patch) | |
tree | fff0a96b3e40828cbcbf858785e64365b683bbba | |
parent | 4b800f5d269de259da29d3b42dae66faf4351476 (diff) |
chore(tests): delete the temporary deno dir when dropping the test lsp client (#11749)
-rw-r--r-- | test_util/src/lsp.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs index 7b9fc5965..87602e3fe 100644 --- a/test_util/src/lsp.rs +++ b/test_util/src/lsp.rs @@ -21,6 +21,7 @@ use std::process::Command; use std::process::Stdio; use std::time::Duration; use std::time::Instant; +use tempfile::TempDir; lazy_static! { static ref CONTENT_TYPE_REG: Regex = @@ -97,6 +98,7 @@ pub struct LspClient { request_id: u64, start: Instant, writer: io::BufWriter<ChildStdin>, + _temp_deno_dir: TempDir, // directory will be deleted on drop } impl Drop for LspClient { @@ -179,6 +181,7 @@ impl LspClient { request_id: 1, start: Instant::now(), writer, + _temp_deno_dir: deno_dir, }) } |