From 579d4bd178f4aae76a4f4dc2ea34bf5e8fa6231b Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 22 Apr 2023 19:20:52 +0200 Subject: 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. --- tests/mason-registry/registry_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3-70-g09d2