Skip to content

Commit

Permalink
tests: fix new loaders-test for nvim0.7 and 0.9, fix flakiness.
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 committed Apr 21, 2024
1 parent 000074c commit c071d3c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/integration/loaders_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ describe("loaders:", function()
screen:expect({
grid = [[
all1^ |
{0:~ }|*3
{2:-- INSERT --} |]],
})
{0:~ }|
{0:~ }|
{0:~ }|
{2:-- INSERT --} |]]})
end)

it("Can lazy-load from multiple sources", function()
Expand Down Expand Up @@ -864,6 +865,7 @@ describe("loaders:", function()

-- double as quick test for package.jsonc
ls_helpers.scratch_edit("snippets/package.jsonc")
exec_lua("vim.wait(100, function() end)")

feed(
[[i{ "name": "snippets", "contributes": { "snippets": [{"language": ["all"], "path": "./all.json"}] } }]]
Expand Down
13 changes: 13 additions & 0 deletions tests/integration/session_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ describe("session", function()
{2:-- INSERT --} |]],
})
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
Expand Down Expand Up @@ -1378,10 +1380,15 @@ describe("session", function()
expand()
-- jump to one before jumping out of child-snippet.
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
Expand Down Expand Up @@ -1627,8 +1634,11 @@ describe("session", function()

-- check connectivity.
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
screen:expect({
grid = [[
/** |
Expand Down Expand Up @@ -2001,8 +2011,11 @@ describe("session", function()
feed("o<Cr><Cr><Cr><Esc>kkifn")
expand()
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
jump(1)
exec_lua("vim.wait(10, function() end)")
feed("int a")
screen:expect({
grid = [[
Expand Down

0 comments on commit c071d3c

Please sign in to comment.