commit e2c5b21e18475f87f4d73eaa471662ce5659d4bd
parent 4f64aef29f24b5ac305b609d0abf78d93e2c5e0d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu, 8 Dec 2022 19:22:40 +0800
test(lsp): call clear() before willSave tests (#21336)
Otherwise these two tests cannot run alone and may fail on CI.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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({