Skip to content

Commit

Permalink
Wait 500 ms; github action is slow
Browse files Browse the repository at this point in the history
  • Loading branch information
uga-rosa committed Jul 27, 2023
1 parent fb12ae3 commit 7a99721
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/ugaterm/terminal_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ describe("Test for terminal", function()
local old_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
terminal:send()
terminal:send("")
vim.wait(500, function() end)
local new_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
assert.same(old_lines, new_lines)
end)
Expand All @@ -99,7 +100,7 @@ describe("Test for terminal", function()
local old_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
assert.falsy(table.concat(old_lines, "\n"):find("echo 'hi'\nhi"))
terminal:send("echo 'hi'")
vim.wait(100, function() end)
vim.wait(500, function() end)
local new_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
assert.truthy(table.concat(new_lines, "\n"):find("echo 'hi'\nhi"))
end)
Expand All @@ -110,7 +111,7 @@ describe("Test for terminal", function()
local old_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
assert.falsy(table.concat(old_lines, "\n"):find("echo 'foo'\nfoo"))
terminal:send({ "echo 'foo'", "echo 'bar'" })
vim.wait(100, function() end)
vim.wait(500, function() end)
local new_lines = vim.api.nvim_buf_get_lines(0, 0, -1, true)
assert.truthy(table.concat(new_lines, "\n"):find("echo 'foo'\nfoo"))
assert.truthy(table.concat(new_lines, "\n"):find("echo 'bar'\nbar"))
Expand Down

0 comments on commit 7a99721

Please sign in to comment.