diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-16 15:21:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 15:21:46 +0800 |
commit | cf3b871fa940c42e9c94257118f7d1131ebd362a (patch) | |
tree | 4520fa46d23c21d6a9f24eed5cadd087261b5f1c /test/functional/legacy/ex_mode_spec.lua | |
parent | a63eea3d238da5c048d0d74e11388425c0c0c3d2 (diff) | |
download | rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.tar.gz rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.tar.bz2 rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.zip |
test: use poke_eventloop() instead of sleep(10) where possible (#19794)
Using sleep(10) to wait for typeahead to finish is flaky, especially on
macOS, where legacy/global_spec.lua has failed several times.
Diffstat (limited to 'test/functional/legacy/ex_mode_spec.lua')
-rw-r--r-- | test/functional/legacy/ex_mode_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/legacy/ex_mode_spec.lua b/test/functional/legacy/ex_mode_spec.lua index a8f54c6939..f21c47e175 100644 --- a/test/functional/legacy/ex_mode_spec.lua +++ b/test/functional/legacy/ex_mode_spec.lua @@ -6,7 +6,7 @@ local eq = helpers.eq local eval = helpers.eval local feed = helpers.feed local meths = helpers.meths -local sleep = helpers.sleep +local poke_eventloop = helpers.poke_eventloop before_each(clear) @@ -143,7 +143,7 @@ describe('Ex mode', function() ^ | ]]) feed('<C-C>') - sleep(10) -- Wait for input to be flushed + poke_eventloop() -- Wait for input to be flushed feed('foo<CR>') screen:expect([[ Entering Ex mode. Type "visual" to go to Normal mode. | |