2026-07-06 19:51:37 -05:00
|
|
|
local watchexec = require("watchexec")
|
2026-07-04 08:46:05 -05:00
|
|
|
|
2026-07-06 19:51:37 -05:00
|
|
|
describe("watchexec module", function()
|
2026-07-04 11:05:50 -05:00
|
|
|
it("can be required without errors", function()
|
2026-07-06 19:51:37 -05:00
|
|
|
assert.not_nil(watchexec)
|
2026-07-04 11:05:50 -05:00
|
|
|
end)
|
2026-07-04 08:46:05 -05:00
|
|
|
|
2026-07-06 19:51:37 -05:00
|
|
|
it("exposes setup function", function()
|
|
|
|
|
assert.is_function(watchexec.setup)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
it("exposes run function", function()
|
|
|
|
|
assert.is_function(watchexec.run)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
it("exposes stop function", function()
|
|
|
|
|
assert.is_function(watchexec.stop)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
it("exposes toggle function", function()
|
|
|
|
|
assert.is_function(watchexec.toggle)
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
it("setup delegates to config", function()
|
|
|
|
|
local config = require("watchexec.config")
|
|
|
|
|
|
|
|
|
|
watchexec.setup({ auto_scroll = false })
|
|
|
|
|
|
|
|
|
|
assert.equals(false, config.get().auto_scroll)
|
2026-07-04 11:05:50 -05:00
|
|
|
end)
|
2026-07-04 08:46:05 -05:00
|
|
|
end)
|