test(editor/defaults_spec): fix flakiness (#34752)

(cherry picked from commit 17ecb2b988)
This commit is contained in:
zeertzjq
2025-07-04 10:35:15 +08:00
committed by github-actions[bot]
parent 2df746e4e8
commit f0f163b267

View File

@@ -19,12 +19,11 @@ describe('default', function()
n.command('let g:n=0')
n.command('au BufEnter * let g:n = g:n + 1')
n.command('terminal')
t.eq(1, n.eval('get(g:, "n", 0)'))
t.eq(1, n.exec_lua('vim.cmd.terminal(); return vim.g.n'))
t.retry(nil, 1000, function()
t.neq('terminal', n.api.nvim_get_option_value('buftype', { buf = 0 }))
t.eq(2, n.eval('get(g:, "n", 0)'))
t.eq(2, n.eval('g:n'))
end)
end)
end)