From 459a6c845e87662aa9aa0d6a0a68dc8d817a0498 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Wed, 27 Jan 2021 15:32:07 +0100 Subject: lsp/tests: Ensure client is stopped in basic_init tests (#13798) --- test/functional/plugin/lsp_spec.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index 41fdf845df..981e2a96a8 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -193,6 +193,12 @@ describe('LSP', function() end) describe('basic_init test', function() + after_each(function() + stop() + exec_lua("lsp.stop_client(lsp.get_active_clients())") + exec_lua("lsp._vim_exit_handler()") + end) + it('should run correctly', function() local expected_callbacks = { {NIL, "test", {}, 1}; @@ -304,11 +310,9 @@ describe('LSP', function() } end) it('workspace/configuration returns NIL per section if client was started without config.settings', function() + clear() fake_lsp_server_setup('workspace/configuration no settings') - eq({ - NIL, - NIL, - }, exec_lua [[ + eq({ NIL, NIL, }, exec_lua [[ local params = { items = { {section = 'foo'}, -- cgit