From ef641dda80f45cb979bc93c2513c6e10cbd8e42a Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Thu, 29 Nov 2018 14:51:01 -0700 Subject: Add test for detail in lsp ReadDiagnostics --- test/lsp/test_read_lsp_diagnostics.vader | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/lsp') diff --git a/test/lsp/test_read_lsp_diagnostics.vader b/test/lsp/test_read_lsp_diagnostics.vader index 444272aa..6ca4f962 100644 --- a/test/lsp/test_read_lsp_diagnostics.vader +++ b/test/lsp/test_read_lsp_diagnostics.vader @@ -89,6 +89,26 @@ Execute(ale#lsp#response#ReadDiagnostics() should handle messages without codes) \ }, \ ]}}) +Execute(ale#lsp#response#ReadDiagnostics() should include sources in detail): + AssertEqual [ + \ { + \ 'type': 'E', + \ 'text': 'Something went wrong!', + \ 'detail': '[tslint] Something went wrong!', + \ 'lnum': 10, + \ 'col': 15, + \ 'end_lnum': 12, + \ 'end_col': 23, + \ } + \ ], + \ ale#lsp#response#ReadDiagnostics({'params': {'uri': 'filename.ts', 'diagnostics': [ + \ { + \ 'range': Range(9, 14, 11, 22), + \ 'message': 'Something went wrong!', + \ 'source': 'tslint', + \ } + \ ]}}) + Execute(ale#lsp#response#ReadDiagnostics() should handle multiple messages): AssertEqual [ \ { -- cgit v1.2.3