summaryrefslogtreecommitdiff
path: root/test/completion/test_lsp_completion_messages.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion/test_lsp_completion_messages.vader')
-rw-r--r--test/completion/test_lsp_completion_messages.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/completion/test_lsp_completion_messages.vader b/test/completion/test_lsp_completion_messages.vader
index e5aac176..00a174dc 100644
--- a/test/completion/test_lsp_completion_messages.vader
+++ b/test/completion/test_lsp_completion_messages.vader
@@ -30,6 +30,11 @@ Before:
\}
endfunction
+ " Pretend we're in insert mode for most tests.
+ function! ale#util#Mode(...) abort
+ return 'i'
+ endfunction
+
" Replace the Send function for LSP, so we can monitor calls to it.
function! ale#lsp#Send(conn_id, message, ...) abort
call add(g:message_list, a:message)
@@ -49,6 +54,11 @@ After:
unlet! b:ale_linters
unlet! b:ale_tsserver_completion_names
+ " Reset the function.
+ function! ale#util#Mode(...) abort
+ return call('mode', a:000)
+ endfunction
+
call ale#lsp#RemoveConnectionWithID(347)
call ale#test#RestoreDirectory()
call ale#linter#Reset()