Skip to content

Commit

Permalink
test: silence warning in trash_spec.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Nov 17, 2024
1 parent 9be99b6 commit faa03e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/yazi/trash_spec.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
local assert = require("luassert")
local yazi_event_handling = require("yazi.event_handling.yazi_event_handling")
local reset = require("spec.yazi.helpers.reset")
local stub = require("luassert.stub")

describe("process_trash_event", function()
local snapshot

before_each(function()
reset.clear_all_buffers()
snapshot = assert:snapshot()

-- silence the following warning
-- "Error executing vim.schedule lua callback: ./lua/yazi/utils.lua:352: Invalid buffer id: 32"
stub(vim.api, "nvim_buf_call")
end)

after_each(function()
snapshot:revert()
end)

it("deletes a buffer that matches the trash event exactly", function()
Expand Down

0 comments on commit faa03e9

Please sign in to comment.