summaryrefslogtreecommitdiff
path: root/test_util/src/lsp.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-06-10 11:09:45 -0400
committerGitHub <noreply@github.com>2023-06-10 11:09:45 -0400
commit7f15126f23d97f20a4fb33e43136cd4d13825863 (patch)
tree85d77389969b31999680059e65954a9fa863758e /test_util/src/lsp.rs
parentf3326eebd6af2aaca1543e8cb543a7b16762bc96 (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 'test_util/src/lsp.rs')
-rw-r--r--test_util/src/lsp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs
index 87dfaf6f9..462779b3a 100644
--- a/test_util/src/lsp.rs
+++ b/test_util/src/lsp.rs
@@ -2,6 +2,7 @@
use crate::deno_exe_path;
use crate::npm_registry_url;
+use crate::PathRef;
use crate::TestContext;
use crate::TestContextBuilder;
@@ -38,7 +39,6 @@ use std::collections::HashSet;
use std::io;
use std::io::Write;
use std::path::Path;
-use std::path::PathBuf;
use std::process::Child;
use std::process::ChildStdin;
use std::process::ChildStdout;
@@ -468,7 +468,7 @@ impl InitializeParamsBuilder {
pub struct LspClientBuilder {
print_stderr: bool,
- deno_exe: PathBuf,
+ deno_exe: PathRef,
context: Option<TestContext>,
use_diagnostic_sync: bool,
}
@@ -485,7 +485,7 @@ impl LspClientBuilder {
}
pub fn deno_exe(&mut self, exe_path: impl AsRef<Path>) -> &mut Self {
- self.deno_exe = exe_path.as_ref().to_path_buf();
+ self.deno_exe = PathRef::new(exe_path);
self
}