diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2022-03-30 09:59:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 09:59:27 +1100 |
commit | 061090de7e95e8e7a97f3277bd1a72899ebd1570 (patch) | |
tree | 85fbf3ed3dc4cf51a15c2baaf8257a47149c43ef /cli/bench | |
parent | 4a0b2c28a15d76c0c40bf07c3753dfbcce4dace1 (diff) |
feat(lsp): add experimental testing API (#13798)
Ref: denoland/vscode_deno#629
Diffstat (limited to 'cli/bench')
-rw-r--r-- | cli/bench/lsp.rs | 8 | ||||
-rw-r--r-- | cli/bench/lsp_bench_standalone.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cli/bench/lsp.rs b/cli/bench/lsp.rs index a7f712d0b..fdddb9734 100644 --- a/cli/bench/lsp.rs +++ b/cli/bench/lsp.rs @@ -44,7 +44,7 @@ struct FixtureMessage { /// the end of the document and does a level of hovering and gets quick fix /// code actions. fn bench_big_file_edits(deno_exe: &Path) -> Result<Duration, AnyError> { - let mut client = LspClient::new(deno_exe)?; + let mut client = LspClient::new(deno_exe, false)?; let params: Value = serde_json::from_slice(FIXTURE_INIT_JSON)?; let (_, response_error): (Option<Value>, Option<LspResponseError>) = @@ -125,7 +125,7 @@ fn bench_big_file_edits(deno_exe: &Path) -> Result<Duration, AnyError> { } fn bench_code_lens(deno_exe: &Path) -> Result<Duration, AnyError> { - let mut client = LspClient::new(deno_exe)?; + let mut client = LspClient::new(deno_exe, false)?; let params: Value = serde_json::from_slice(FIXTURE_INIT_JSON)?; let (_, maybe_err) = @@ -189,7 +189,7 @@ fn bench_code_lens(deno_exe: &Path) -> Result<Duration, AnyError> { } fn bench_find_replace(deno_exe: &Path) -> Result<Duration, AnyError> { - let mut client = LspClient::new(deno_exe)?; + let mut client = LspClient::new(deno_exe, false)?; let params: Value = serde_json::from_slice(FIXTURE_INIT_JSON)?; let (_, maybe_err) = @@ -285,7 +285,7 @@ fn bench_find_replace(deno_exe: &Path) -> Result<Duration, AnyError> { /// A test that starts up the LSP, opens a single line document, and exits. fn bench_startup_shutdown(deno_exe: &Path) -> Result<Duration, AnyError> { - let mut client = LspClient::new(deno_exe)?; + let mut client = LspClient::new(deno_exe, false)?; let params: Value = serde_json::from_slice(FIXTURE_INIT_JSON)?; let (_, response_error) = diff --git a/cli/bench/lsp_bench_standalone.rs b/cli/bench/lsp_bench_standalone.rs index 0caa8620d..b8682f7cd 100644 --- a/cli/bench/lsp_bench_standalone.rs +++ b/cli/bench/lsp_bench_standalone.rs @@ -12,7 +12,7 @@ use test_util::lsp::LspClient; // https://github.com/quick-lint/quick-lint-js/blob/35207e6616267c6c81be63f47ce97ec2452d60df/benchmark/benchmark-lsp/lsp-benchmarks.cpp#L223-L268 fn incremental_change_wait(bench: &mut Bencher) { let deno_exe = test_util::deno_exe_path(); - let mut client = LspClient::new(&deno_exe).unwrap(); + let mut client = LspClient::new(&deno_exe, false).unwrap(); static FIXTURE_INIT_JSON: &[u8] = include_bytes!("testdata/initialize_params.json"); |