From 39c892eff4f167333e2a05472e0922cba5471a0d Mon Sep 17 00:00:00 2001 From: w0rp Date: Mon, 10 Dec 2018 20:08:28 +0000 Subject: #1520 - Add an :ALEDocumentation for tsserver --- test/test_hover.vader | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/test_hover.vader') 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 -- cgit v1.2.3