summaryrefslogtreecommitdiff
path: root/test/test_hover.vader
diff options
context:
space:
mode:
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