From e2c5b21e18475f87f4d73eaa471662ce5659d4bd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 8 Dec 2022 19:22:40 +0800 Subject: test(lsp): call clear() before willSave tests (#21336) Otherwise these two tests cannot run alone and may fail on CI. --- test/functional/plugin/lsp_spec.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index f38a7ad044..163667d5f3 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -622,6 +622,7 @@ describe('LSP', function() end) it('BufWritePre does not send notifications if server lacks willSave capabilities', function() + clear() exec_lua(create_server_definition) local messages = exec_lua([[ local server = _create_server({ @@ -644,7 +645,9 @@ describe('LSP', function() eq(messages[3].method, 'shutdown') eq(messages[4].method, 'exit') end) + it('BufWritePre sends willSave / willSaveWaitUntil, applies textEdits', function() + clear() exec_lua(create_server_definition) local result = exec_lua([[ local server = _create_server({ -- cgit