Meh I'll figure out submodules later
This commit is contained in:
parent
4ca9d44a90
commit
8cb281f436
352 changed files with 66107 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
pcall(require, "luacov")
|
||||
|
||||
describe("Event queue", function()
|
||||
it("should return data when handled = true", function()
|
||||
local events = require("neo-tree.events")
|
||||
events.subscribe({
|
||||
event = "test",
|
||||
handler = function()
|
||||
return { data = "first" }
|
||||
end,
|
||||
})
|
||||
events.subscribe({
|
||||
event = "test",
|
||||
handler = function()
|
||||
return { handled = true, data = "second" }
|
||||
end,
|
||||
})
|
||||
events.subscribe({
|
||||
event = "test",
|
||||
handler = function()
|
||||
return { data = "third" }
|
||||
end,
|
||||
})
|
||||
local result = events.fire_event("test") or {}
|
||||
local data = result.data
|
||||
assert.are.same("second", data)
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue