diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-05-19 22:28:23 +1000 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:30 +0200 |
commit | 6ef64b9fce9ed0f2c78025063d9a44f8e0acd124 (patch) | |
tree | 70c2721fc62f616ed7808f6a274e1681d13b06ab /cli/tests/integration_tests_lsp.rs | |
parent | 073e05f9fbf54f4de6e8a033d157e61969f1335c (diff) |
fix(#10695): deps diagnostics include data property (#10696)
Fixes #10695
Diffstat (limited to 'cli/tests/integration_tests_lsp.rs')
-rw-r--r-- | cli/tests/integration_tests_lsp.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cli/tests/integration_tests_lsp.rs b/cli/tests/integration_tests_lsp.rs index d08da622f..ad41afada 100644 --- a/cli/tests/integration_tests_lsp.rs +++ b/cli/tests/integration_tests_lsp.rs @@ -1362,17 +1362,24 @@ fn lsp_code_actions() { #[test] fn lsp_code_actions_deno_cache() { let mut client = init("initialize_params.json"); - did_open( - &mut client, - json!({ + client + .write_notification("textDocument/didOpen", json!({ "textDocument": { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, "text": "import * as a from \"https://deno.land/x/a/mod.ts\";\n\nconsole.log(a);\n" } - }), - ); + })) + .unwrap(); + let (method, _) = client.read_notification::<Value>().unwrap(); + assert_eq!(method, "textDocument/publishDiagnostics"); + let (method, _) = client.read_notification::<Value>().unwrap(); + assert_eq!(method, "textDocument/publishDiagnostics"); + let (method, params) = client.read_notification().unwrap(); + assert_eq!(method, "textDocument/publishDiagnostics"); + assert_eq!(params, Some(load_fixture("diagnostics_deno_deps.json"))); + let (maybe_res, maybe_err) = client .write_request( "textDocument/codeAction", |