Files
watchexec.nvim/tests/watchexec/watchexec_spec.lua
T
Stevan Freeborn 1c46c3fcd9 feat: implement public API and plugin commands
Rewrite init.lua to expose setup(), run(), stop(), and toggle() that
coordinate across config, runner, window, and indicator modules. Replace
the placeholder SayHello command in plugin/watchexec.lua with keymaps
(<Leader>wx{t,s,r}), :WatchexecRun/:WatchexecStop/:WatchexecToggle
commands, VimLeavePre cleanup, and VimResized auto-resize.
2026-07-06 19:51:37 -05:00

32 lines
726 B
Lua

local watchexec = require("watchexec")
describe("watchexec module", function()
it("can be required without errors", function()
assert.not_nil(watchexec)
end)
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)
end)
end)