diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-09-27 01:48:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 01:48:34 +0100 |
commit | b433133a1ff1c329b05ce024d8db5fefb8f7b431 (patch) | |
tree | 0775206ebded9ef9a980fd684f353f3e694a65be /cli/tests | |
parent | 46a4bd5178f5aed22041422c431b5ab6f697865d (diff) |
fix(lsp): allow query strings for "deno:/status.md" (#20697)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ -4321,6 +4321,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(); let mut client = context.new_lsp_command().build(); |