diff options
Diffstat (limited to 'tests/mason-registry/registry_spec.lua')
| -rw-r--r-- | tests/mason-registry/registry_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/mason-registry/registry_spec.lua b/tests/mason-registry/registry_spec.lua index 359c0630..35c37853 100644 --- a/tests/mason-registry/registry_spec.lua +++ b/tests/mason-registry/registry_spec.lua @@ -1,4 +1,5 @@ local Pkg = require "mason-core.package" +local test_helpers = require "mason-test.helpers" local registry = require "mason-registry" describe("mason-registry", function() @@ -21,4 +22,11 @@ describe("mason-registry", function() it("should get all package specs", function() assert.equals(3, #registry.get_all_package_specs()) end) + + it("should check if package is installed", function () + local dummy = registry.get_package "dummy" + assert.is_false(registry.is_installed "dummy") + test_helpers.sync_install(dummy) + assert.is_true(registry.is_installed "dummy") + end) end) |
