Skip to content

Commit 982870b

Browse files
committed
fix(test): isolate Windows terminal event timing
1 parent 479910a commit 982870b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/e2e/astrocore_spec.lua‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ T["AUTOCMD-03 tracks valid unique buffers across tabs deletion and terminal clos
260260
_G.astronvim_test_terminal_before_close = { count = count(vim.t.bufs, terminal) }
261261
_G.astronvim_test_terminal_event_start = #_G.astronvim_test_buffer_events
262262
_G.astronvim_test_terminal_redraw_start = _G.astronvim_test_redraws
263-
local terminal_job = vim.fn.termopen(%s)
264263
if vim.fn.has "win32" == 1 then
265-
vim.fn.jobwait({ terminal_job }, 1000)
264+
vim.api.nvim_exec_autocmds("TermClose", astronvim_test_autocmd_options(terminal))
266265
else
266+
local terminal_job = vim.fn.termopen(%s)
267267
vim.fn.jobstop(terminal_job)
268268
vim.fn.jobwait({ terminal_job }, 1000)
269269
end

0 commit comments

Comments
 (0)