diff options
| author | William Boman <william@redwill.se> | 2023-04-03 00:33:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-02 22:33:48 +0000 |
| commit | 0114336145771ff7c528debba52c5ff21bf6f7a2 (patch) | |
| tree | 37802cb27b602c9c3e900aec7f3ad012ed3b8719 /tests/mason-core/ui_spec.lua | |
| parent | chore: consolidate generate task (#1171) (diff) | |
| download | mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.gz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.bz2 mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.lz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.xz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.zst mason-0114336145771ff7c528debba52c5ff21bf6f7a2.zip | |
refactor: only schedule in a.scheduler() when in fast event (#1170)
Explicitly schedule via `a.wait(vim.schedule)` instead.
Diffstat (limited to 'tests/mason-core/ui_spec.lua')
| -rw-r--r-- | tests/mason-core/ui_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/mason-core/ui_spec.lua b/tests/mason-core/ui_spec.lua index 8c80cc3b..40a8b888 100644 --- a/tests/mason-core/ui_spec.lua +++ b/tests/mason-core/ui_spec.lua @@ -186,7 +186,7 @@ describe("integration test", function() window.open() -- Initial window and buffer creation + initial render - a.scheduler() + a.wait(vim.schedule) assert.spy(win_set_option).was_called(9) assert.spy(win_set_option).was_called_with(match.is_number(), "number", false) @@ -245,7 +245,7 @@ describe("integration test", function() end) assert.spy(set_lines).was_called(1) - a.scheduler() + a.wait(vim.schedule) assert.spy(set_lines).was_called(2) assert @@ -288,12 +288,12 @@ describe("integration test", function() local mutate_state = window.state { show_extra_lines = false } window.init {} window.open() - a.scheduler() + a.wait(vim.schedule) window.set_cursor { 5, 3 } -- move cursor to sticky line mutate_state(function(state) state.show_extra_lines = true end) - a.scheduler() + a.wait(vim.schedule) local cursor = window.get_cursor() assert.same({ 8, 3 }, cursor) end) @@ -311,7 +311,7 @@ describe("integration test", function() window.state {} window.init { border = "rounded" } window.open() - a.scheduler() + a.wait(vim.schedule) assert.spy(nvim_open_win).was_called(1) assert.spy(nvim_open_win).was_called_with( |
