summaryrefslogtreecommitdiff
path: root/test/test_hover.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-12-10 20:08:28 +0000
committerw0rp <devw0rp@gmail.com>2018-12-10 20:08:28 +0000
commit39c892eff4f167333e2a05472e0922cba5471a0d (patch)
treeea621f3d11659b3efb217ec899c31b7c09adb583 /test/test_hover.vader
parent9226e13b31474ac17d0c25cd27aa55bff21d55c2 (diff)
downloadale-39c892eff4f167333e2a05472e0922cba5471a0d.zip
#1520 - Add an :ALEDocumentation for tsserver
Diffstat (limited to 'test/test_hover.vader')
-rw-r--r--test/test_hover.vader20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_hover.vader b/test/test_hover.vader
index a18fc651..13cfdbab 100644
--- a/test/test_hover.vader
+++ b/test/test_hover.vader
@@ -149,3 +149,23 @@ Execute(LSP hover response with lists of strings and marked strings should be ha
AssertEqual ["foo\nbar\n"], g:echo_list
AssertEqual {}, ale#hover#GetMap()
+
+Execute(tsserver responses for documentation requests should be handled):
+ call ale#hover#SetMap({3: {'show_documentation': 1}})
+
+ call ale#hover#HandleTSServerResponse(
+ \ 1,
+ \ {
+ \ 'command': 'quickinfo',
+ \ 'request_seq': 3,
+ \ 'success': v:true,
+ \ 'body': {
+ \ 'documentation': 'foo is a very good method',
+ \ 'displayString': 'foo bar',
+ \ },
+ \ }
+ \)
+
+ " The preview window should show the text.
+ AssertEqual ['foo is a very good method'], ale#test#GetPreviewWindowText()
+ silent! pclose