From 1bb926ca068a32857b3d0441096497dab3d9e34a Mon Sep 17 00:00:00 2001 From: William Boman Date: Tue, 6 May 2025 23:26:30 +0200 Subject: tests: fix flaky test (#1924) --- 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 89b9436f..daa8fc9f 100644 --- a/tests/mason-registry/registry_spec.lua +++ b/tests/mason-registry/registry_spec.lua @@ -25,6 +25,10 @@ describe("mason-registry", function() it("should check if package is installed", function() local dummy = registry.get_package "dummy" + -- TODO unflake this in a better way + if dummy:is_installed() then + test_helpers.sync_uninstall(dummy) + end assert.is_false(registry.is_installed "dummy") test_helpers.sync_install(dummy) assert.is_true(registry.is_installed "dummy") -- cgit v1.2.3-70-g09d2