mirror of
https://github.com/neovim/neovim.git
synced 2026-01-07 05:43:14 +00:00
test(lsp): fix flakiness in inline completion test (#35676)
The flakiness happens because get() uses vim.schedule(), and a following key may be processed before the scheduled event. Use poke_eventloop() to ensure that the scheduled event is processed.
This commit is contained in:
@@ -181,6 +181,7 @@ describe('vim.lsp.inline_completion', function()
|
||||
exec_lua(function()
|
||||
vim.lsp.inline_completion.get()
|
||||
end)
|
||||
n.poke_eventloop()
|
||||
feed('<Esc>')
|
||||
screen:expect({ grid = grid_applied_candidates })
|
||||
end)
|
||||
@@ -267,6 +268,7 @@ describe('vim.lsp.inline_completion', function()
|
||||
exec_lua(function()
|
||||
vim.lsp.inline_completion.get()
|
||||
end)
|
||||
n.poke_eventloop()
|
||||
feed('<Esc>')
|
||||
screen:expect([[
|
||||
function fibonacci(n) { |
|
||||
|
||||
Reference in New Issue
Block a user