refactor: rename build to compile and watch to toggle in public API
Problem: the code used build/watch while the help file already documented compile/toggle, creating a confusing mismatch. Solution: rename M.build() to M.compile() and M.watch() to M.toggle() in init.lua, update handler keys in commands.lua, and update the test file to match.
This commit is contained in:
parent
4732696a62
commit
7a7c407d97
3 changed files with 12 additions and 12 deletions
|
|
@ -14,10 +14,10 @@ describe('commands', function()
|
|||
end)
|
||||
|
||||
describe('dispatch', function()
|
||||
it('does not error on :Preview with no provider', function()
|
||||
it('does not error on :Preview compile with no provider', function()
|
||||
require('preview.commands').setup()
|
||||
assert.has_no.errors(function()
|
||||
vim.cmd('Preview build')
|
||||
vim.cmd('Preview compile')
|
||||
end)
|
||||
end)
|
||||
|
||||
|
|
@ -42,10 +42,10 @@ describe('commands', function()
|
|||
end)
|
||||
end)
|
||||
|
||||
it('does not error on :Preview watch with no provider', function()
|
||||
it('does not error on :Preview toggle with no provider', function()
|
||||
require('preview.commands').setup()
|
||||
assert.has_no.errors(function()
|
||||
vim.cmd('Preview watch')
|
||||
vim.cmd('Preview toggle')
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue