aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core/package/package_spec.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-15 21:03:06 +0200
committerGitHub <noreply@github.com>2022-08-15 21:03:06 +0200
commit3c62386a396ae0c1cd7adbaacc379eb4af072a65 (patch)
tree4d00d20958839a04e6a996c11b97724c762e491a /tests/mason-core/package/package_spec.lua
parentchore: update generated code (#295) (diff)
downloadmason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.gz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.bz2
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.lz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.xz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.zst
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.zip
refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296)
Diffstat (limited to 'tests/mason-core/package/package_spec.lua')
-rw-r--r--tests/mason-core/package/package_spec.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/mason-core/package/package_spec.lua b/tests/mason-core/package/package_spec.lua
index 113d8d1b..875ce3c6 100644
--- a/tests/mason-core/package/package_spec.lua
+++ b/tests/mason-core/package/package_spec.lua
@@ -36,42 +36,42 @@ describe("package", function()
end
assert.equals(
"name: expected string, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { name = 23 })
end)
)
assert.equals(
"desc: expected string, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { desc = 23 })
end)
)
assert.equals(
"homepage: expected string, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { homepage = 23 })
end)
)
assert.equals(
"categories: expected table, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { categories = 23 })
end)
)
assert.equals(
"languages: expected table, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { languages = 23 })
end)
)
assert.equals(
"install: expected function, got number",
- assert.error(function()
+ assert.has_error(function()
Pkg.new(spec { install = 23 })
end)
)
@@ -96,7 +96,7 @@ describe("package", function()
}
local handle_handler = spy.new()
dummy:once("handle", handle_handler)
- local err = assert.error(function()
+ local err = assert.has_error(function()
dummy:new_handle()
end)
assert.equals("Cannot create new handle because existing handle is not closed.", err)