lsp/tests: Ensure client is stopped in basic_init tests (#13798)

This commit is contained in:
Mathias Fußenegger
2021-01-27 15:32:07 +01:00
committed by GitHub
parent 271cec291a
commit 459a6c845e

View File

@@ -193,6 +193,12 @@ describe('LSP', function()
end) end)
describe('basic_init test', function() 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() it('should run correctly', function()
local expected_callbacks = { local expected_callbacks = {
{NIL, "test", {}, 1}; {NIL, "test", {}, 1};
@@ -304,11 +310,9 @@ describe('LSP', function()
} }
end) end)
it('workspace/configuration returns NIL per section if client was started without config.settings', function() it('workspace/configuration returns NIL per section if client was started without config.settings', function()
clear()
fake_lsp_server_setup('workspace/configuration no settings') fake_lsp_server_setup('workspace/configuration no settings')
eq({ eq({ NIL, NIL, }, exec_lua [[
NIL,
NIL,
}, exec_lua [[
local params = { local params = {
items = { items = {
{section = 'foo'}, {section = 'foo'},