From 7a99721acac5a0001003509f074c632c8d6aae67 Mon Sep 17 00:00:00 2001 From: uga-rosa Date: Thu, 27 Jul 2023 18:05:13 +0900 Subject: [PATCH] Wait 500 ms; github action is slow --- lua/ugaterm/terminal_spec.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/ugaterm/terminal_spec.lua b/lua/ugaterm/terminal_spec.lua index 020466a..fdc0a56 100644 --- a/lua/ugaterm/terminal_spec.lua +++ b/lua/ugaterm/terminal_spec.lua @@ -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) @@ -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) @@ -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"))