diff options
author | Horacio Sanson <horacio@allm.net> | 2019-05-23 10:19:07 +0900 |
---|---|---|
committer | Horacio Sanson <horacio@allm.net> | 2019-05-23 10:19:07 +0900 |
commit | 85b3a4a5c68f9bfd81d09bcd96ce6a26a521dc3d (patch) | |
tree | 8883b3f001ed30fc6d0465ded44ac564291247a5 /test/test_engine_lsp_response_handling.vader | |
parent | 2f13c2d26390703c591d756f49cd1207b98f3689 (diff) | |
download | ale-85b3a4a5c68f9bfd81d09bcd96ce6a26a521dc3d.zip |
Add exact file match test to TSServer response handler
Diffstat (limited to 'test/test_engine_lsp_response_handling.vader')
-rw-r--r-- | test/test_engine_lsp_response_handling.vader | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/test/test_engine_lsp_response_handling.vader b/test/test_engine_lsp_response_handling.vader index 84febe39..aeb13a86 100644 --- a/test/test_engine_lsp_response_handling.vader +++ b/test/test_engine_lsp_response_handling.vader @@ -92,6 +92,35 @@ Execute(tsserver syntax error responses should be handled correctly): \ ], \ ale#test#GetLoclistWithoutModule() + " Syntax errors on the project root should not populate the LocList. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'syntaxDiag', + \ 'body': { + \ 'file': g:dir, + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': ''','' expected.', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutModule() + Execute(tsserver semantic error responses should be handled correctly): runtime ale_linters/typescript/tsserver.vim call ale#test#SetFilename('filename.ts') @@ -165,6 +194,35 @@ Execute(tsserver semantic error responses should be handled correctly): \ ], \ ale#test#GetLoclistWithoutModule() + " Semantic errors on the project root should not populate the LocList. + call ale#lsp_linter#HandleLSPResponse(1, { + \ 'seq': 0, + \ 'type': 'event', + \ 'event': 'semanticDiag', + \ 'body': { + \ 'file': g:dir, + \ 'diagnostics':[ + \ { + \ 'start': { + \ 'line':2, + \ 'offset':14, + \ }, + \ 'end': { + \ 'line':2, + \ 'offset':15, + \ }, + \ 'text': 'Some semantic error', + \ "code":1005 + \ }, + \ ], + \ }, + \}) + + AssertEqual + \ [ + \ ], + \ ale#test#GetLoclistWithoutModule() + Execute(tsserver errors should mark tsserver no longer active): let b:ale_linters = ['tsserver'] runtime ale_linters/typescript/tsserver.vim |