aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-13 17:19:08 +0200
committerGitHub <noreply@github.com>2022-07-13 17:19:08 +0200
commit0c6dd949d395d1543c8813f028ae25b48947e50d (patch)
tree7ecebf40aa7c189fb460d299eb85821ef6a60552 /lua
parentrefactor(api): change signatures to accept list of packages (#68) (diff)
downloadmason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar.gz
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar.bz2
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar.lz
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar.xz
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.tar.zst
mason-0c6dd949d395d1543c8813f028ae25b48947e50d.zip
tests: add some mason-core.package tests (#69)
Diffstat (limited to 'lua')
-rw-r--r--lua/mason-core/package/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/mason-core/package/init.lua b/lua/mason-core/package/init.lua
index ec4bf8f1..1627c1ec 100644
--- a/lua/mason-core/package/init.lua
+++ b/lua/mason-core/package/init.lua
@@ -101,7 +101,10 @@ function Package:install(opts)
-- This function is not expected to be run in async scope, so we create
-- a new scope here and handle the result callback-style.
a.run(
- installer.execute,
+ function(...)
+ -- we wrap installer.execute for testing purposes (to allow spy objects)
+ return installer.execute(...)
+ end,
---@param success boolean
---@param result Result
function(success, result)