fix(test): more mocks

This commit is contained in:
Barrett Ruth 2025-09-22 23:14:54 -04:00
parent a84b1697bf
commit 4b70a21210
3 changed files with 15 additions and 22 deletions

View file

@ -75,15 +75,11 @@ describe('async integration', function()
end,
}
local cmd_methods = {
e = function() end,
only = function() end,
startinsert = function() end,
stopinsert = function() end,
}
vim.cmd = setmetatable(function() end, {
__index = cmd_methods,
})
vim.cmd = function() end
vim.cmd.e = function() end
vim.cmd.only = function() end
vim.cmd.startinsert = function() end
vim.cmd.stopinsert = function() end
vim.api.nvim_get_current_buf = function()
return 1
end
@ -183,7 +179,7 @@ describe('async integration', function()
it('handles language flags correctly', function()
local language_passed = nil
local mock_async_setup = {
setup_contest_async = function(contest_id, language)
setup_contest_async = function(_, language)
language_passed = language
end,
}