Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(lsp): call clear() before willSave tests #21336

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test(lsp): call clear() before willSave tests
Otherwise these two tests cannot run alone and may fail on CI.
  • Loading branch information
zeertzjq committed Dec 8, 2022
commit 6063f9c5fb19daec2cdd59528aa87f173aa6504b
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