Skip to content

Commit

Permalink
test(lsp): call clear() before willSave tests (neovim#21336)
Browse files Browse the repository at this point in the history
Otherwise these two tests cannot run alone and may fail on CI.
  • Loading branch information
zeertzjq authored and yesean committed Mar 25, 2023
1 parent 82cc57b commit 3ee3c7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/plugin/lsp_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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({
Expand Down

0 comments on commit 3ee3c7d

Please sign in to comment.