From b433133a1ff1c329b05ce024d8db5fefb8f7b431 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 27 Sep 2023 01:48:34 +0100 Subject: fix(lsp): allow query strings for "deno:/status.md" (#20697) --- cli/tests/integration/lsp_tests.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 1d0e482fa..ca4b77f4d 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -4320,6 +4320,35 @@ fn test_lsp_code_actions_ordering() { ); } +#[test] +fn lsp_status_file() { + let context = TestContextBuilder::new().use_temp_cwd().build(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + + let res = client.write_request( + "deno/virtualTextDocument", + json!({ + "textDocument": { + "uri": "deno:/status.md" + } + }), + ); + let res = res.as_str().unwrap().to_string(); + assert!(res.starts_with("# Deno Language Server Status")); + + let res = client.write_request( + "deno/virtualTextDocument", + json!({ + "textDocument": { + "uri": "deno:/status.md?1" + } + }), + ); + let res = res.as_str().unwrap().to_string(); + assert!(res.starts_with("# Deno Language Server Status")); +} + #[test] fn lsp_code_actions_deno_cache() { let context = TestContextBuilder::new().use_temp_cwd().build(); -- cgit v1.2.3