aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mason/api/command_spec.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/mason/api/command_spec.lua b/tests/mason/api/command_spec.lua
index 6945340d..673e530b 100644
--- a/tests/mason/api/command_spec.lua
+++ b/tests/mason/api/command_spec.lua
@@ -25,8 +25,10 @@ describe(":MasonInstall", function()
spy.on(Pkg, "install")
api.MasonInstall { "dummy@1.0.0", "dummy2" }
assert.spy(Pkg.install).was_called(2)
- assert.spy(Pkg.install).was_called_with(match.is_ref(dummy), { version = "1.0.0" })
- assert.spy(Pkg.install).was_called_with(match.is_ref(dummy2), match.tbl_containing { version = match.is_nil() })
+ assert.spy(Pkg.install).was_called_with(match.is_ref(dummy), { version = "1.0.0" }, match.is_function())
+ assert
+ .spy(Pkg.install)
+ .was_called_with(match.is_ref(dummy2), match.tbl_containing { version = match.is_nil() }, match.is_function())
end)
it("should install provided packages in debug mode", function()
@@ -35,8 +37,12 @@ describe(":MasonInstall", function()
spy.on(Pkg, "install")
vim.cmd [[MasonInstall --debug dummy dummy2]]
assert.spy(Pkg.install).was_called(2)
- assert.spy(Pkg.install).was_called_with(match.is_ref(dummy), { version = nil, debug = true })
- assert.spy(Pkg.install).was_called_with(match.is_ref(dummy2), { version = nil, debug = true })
+ assert
+ .spy(Pkg.install)
+ .was_called_with(match.is_ref(dummy), { version = nil, debug = true }, match.is_function())
+ assert
+ .spy(Pkg.install)
+ .was_called_with(match.is_ref(dummy2), { version = nil, debug = true }, match.is_function())
end)
it("should open the UI window", function()