fix(test): mock

This commit is contained in:
Barrett Ruth 2025-09-22 23:11:15 -04:00
parent 76cb1e456e
commit a84b1697bf
4 changed files with 52 additions and 3 deletions

View file

@ -20,7 +20,7 @@ describe('cp.async.setup', function()
},
})
end,
scrape_problem_async = function(platform, contest_id, problem_id, callback)
scrape_problem_async = function(_, _, problem_id, callback)
callback({
success = true,
problem_id = problem_id,
@ -69,10 +69,15 @@ describe('cp.async.setup', function()
end,
}
vim.cmd = {
local cmd_methods = {
e = function() end,
only = function() end,
startinsert = function() end,
stopinsert = function() end,
}
vim.cmd = setmetatable(function() end, {
__index = cmd_methods,
})
vim.api.nvim_get_current_buf = function()
return 1
end