test(git/object): cover URI parsing, M.open, and open_under_cursor

This commit is contained in:
2026-05-09 02:26:07 +02:00
parent cdb25abb7f
commit 9b29325508
2 changed files with 187 additions and 0 deletions
+13
View File
@@ -161,4 +161,17 @@ function M.wait_for(cond, msg, timeout)
M.truthy(vim.wait(timeout or 1000, cond), "timed out waiting for: " .. msg)
end
---Run `fn` with `vim.notify` stubbed to a no-op so error/warning paths
---don't bleed onto the test runner's stdout.
---@param fn fun()
function M.quietly(fn)
local orig = vim.notify
vim.notify = function() end
local ok, err = pcall(fn)
vim.notify = orig
if not ok then
error(err, 0)
end
end
return M