diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-01 01:22:03 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-02 10:58:18 +0100 |
commit | 9f21e45156fd6dc8bb03f984e7009f476bf0a517 (patch) | |
tree | ce22166fb2f6eee76ef2f5725ae2e0e2dce58d06 /test | |
parent | 0d8be55c511502c116fdfcba16283cb88bd9b9b2 (diff) | |
download | ale-9f21e45156fd6dc8bb03f984e7009f476bf0a517.zip |
Add some experimental completion code for tsserver
Diffstat (limited to 'test')
-rw-r--r-- | test/lsp/test_lsp_client_messages.vader | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader index 5decbf6c..3b5c64fa 100644 --- a/test/lsp/test_lsp_client_messages.vader +++ b/test/lsp/test_lsp_client_messages.vader @@ -146,3 +146,34 @@ Execute(ale#lsp#tsserver_message#Geterr() should return correct messages): \ } \ ], \ ale#lsp#tsserver_message#Geterr(bufnr('')) + +Execute(ale#lsp#tsserver_message#Completions() should return correct messages): + silent! noautocmd file foo.ts + + AssertEqual + \ [ + \ 0, + \ 'ts@completions', + \ { + \ 'file': b:dir . '/foo.ts', + \ 'line': 347, + \ 'offset': 12, + \ } + \ ], + \ ale#lsp#tsserver_message#Completions(bufnr(''), 347, 12) + +Execute(ale#lsp#tsserver_message#CompletionEntryDetails() should return correct messages): + silent! noautocmd file foo.ts + + AssertEqual + \ [ + \ 0, + \ 'ts@completionEntryDetails', + \ { + \ 'file': b:dir . '/foo.ts', + \ 'line': 347, + \ 'offset': 12, + \ 'entryNames': ['foo', 'bar'], + \ } + \ ], + \ ale#lsp#tsserver_message#CompletionEntryDetails(bufnr(''), 347, 12, ['foo', 'bar']) |