aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-04-22 19:20:52 +0200
committerGitHub <noreply@github.com>2023-04-22 19:20:52 +0200
commit579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b (patch)
treeec3b23ec8a00ba1922bda6c7cf80a0c9242e1978 /tests
parentchore: remove generate scripts and artifacts (#1246) (diff)
downloadmason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar.gz
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar.bz2
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar.lz
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar.xz
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.tar.zst
mason-579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b.zip
feat(registry): add .get_all_package_specs() (#1247)
This is a faster method than .get_all_packages() due to the fact that it only loads package specifications without instantiating mason-core.package instances. Useful for situations where one only needs to read spec data.
Diffstat (limited to 'tests')
-rw-r--r--tests/mason-registry/registry_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mason-registry/registry_spec.lua b/tests/mason-registry/registry_spec.lua
index 5931ca35..359c0630 100644
--- a/tests/mason-registry/registry_spec.lua
+++ b/tests/mason-registry/registry_spec.lua
@@ -17,4 +17,8 @@ describe("mason-registry", function()
assert.is_true(registry.has_package "dummy")
assert.is_false(registry.has_package "non-existent")
end)
+
+ it("should get all package specs", function()
+ assert.equals(3, #registry.get_all_package_specs())
+ end)
end)