diff --git a/tests/core/init_spec.lua b/tests/core/init_spec.lua index 3a1b4c7..4970871 100644 --- a/tests/core/init_spec.lua +++ b/tests/core/init_spec.lua @@ -1,7 +1,11 @@ +---@module 'luassert' +local Util = require("lazy.core.util") + describe("init", function() it("has correct environment for tests", function() - for _, path in ipairs({ "config", "data", "cache", "state" }) do - assert(vim.fn.stdpath(path):find(".tests/" .. path)) + for _, name in ipairs({ "config", "data", "cache", "state" }) do + local path = Util.norm(vim.fn.stdpath(name) --[[@as string]]) + assert(path:find(".tests/" .. name, 1, true), path .. " not in .tests") end end) end)