diff --git a/lua/lazyvim/plugins/extras/test/core.lua b/lua/lazyvim/plugins/extras/test/core.lua index 28797a2c..a331cc7c 100644 --- a/lua/lazyvim/plugins/extras/test/core.lua +++ b/lua/lazyvim/plugins/extras/test/core.lua @@ -55,7 +55,13 @@ return { elseif config ~= false then local adapter = require(name) if type(config) == "table" and not vim.tbl_isempty(config) then - adapter = adapter(config) + if adapter.setup then + adapter.setup(config) + elseif adapter.__call then + adapter(config) + else + error("Adapter " .. name .. " does not support setup") + end end adapters[#adapters + 1] = adapter end