diff options
author | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:51:01 -0700 |
---|---|---|
committer | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:51:01 -0700 |
commit | ef641dda80f45cb979bc93c2513c6e10cbd8e42a (patch) | |
tree | 0029e72b882eeeb3711de26e795a0f5ddf0012ed | |
parent | fcd5e18a9955df2a11f97f05ce23a45d0ba3f523 (diff) | |
download | ale-ef641dda80f45cb979bc93c2513c6e10cbd8e42a.zip |
Add test for detail in lsp ReadDiagnostics
-rw-r--r-- | test/lsp/test_read_lsp_diagnostics.vader | 20 |
1 files changed, 20 insertions, 0 deletions
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 [ \ { |