Fix failing tests

This commit is contained in:
hrsh7th
2021-08-27 23:26:22 +09:00
parent 405581e740
commit 1851fad7fc
2 changed files with 15 additions and 21 deletions

View File

@@ -51,20 +51,5 @@ async.dedup = function()
end
end
---Wiat for callback.
---@param runner fun(done: function)
---@param timeout number
---@return any
async.sync = function(runner, timeout)
local done = false
local res = runner(function()
done = true
end)
vim.wait(timeout or 1000, function()
return done
end, 100, false)
return res
end
return async