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

This commit is contained in:
zeertzjq
2025-07-04 10:35:15 +08:00
committed by GitHub
parent 14d8d11671
commit 17ecb2b988

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)