test: fix mason in extra tests

This commit is contained in:
Folke Lemaitre
2025-10-20 08:36:01 +02:00
parent 80a980ab00
commit d44f8bf317

View File

@@ -26,8 +26,15 @@ describe("Extra", function()
return not vim.tbl_contains(ignore, extra.modname)
end, extras)
require("mason").setup()
local mr = require("mason-registry")
mr.refresh()
local lsp_to_pkg = {}
lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package
it("can get lspconfig to package map", function()
assert(not vim.tbl_isempty(lsp_to_pkg), "Could not get lspconfig to package map")
end)
local tsspec = Plugin.Spec.new({
import = "lazyvim.plugins.treesitter",