From b1821ca2fa193526246057f1659ee631be3912f7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Jun 2024 07:26:49 +0200 Subject: [PATCH] ci: tests using minit --- tests/busted.lua | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/tests/busted.lua b/tests/busted.lua index 8fd4f28..0bc764b 100755 --- a/tests/busted.lua +++ b/tests/busted.lua @@ -1,28 +1,9 @@ #!/usr/bin/env -S nvim -l --- set stdpaths to use .tests -local root = vim.fn.fnamemodify("./.tests", ":p") -for _, name in ipairs({ "config", "data", "state", "cache" }) do - vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name -end - vim.opt.rtp:prepend(".") -vim.o.loadplugins = true -- enable since nvim -l disables plugins - -- Setup lazy.nvim -require("lazy").setup({ - spec = { - "lunarmodules/busted", -- add busted - }, - rocks = { hererocks = true }, +require("lazy.minit").busted({ + spec = {}, + stdpath = ".tests", }) - -local Config = require("lazy.core.config") --- disable termnial output for the tests -Config.options.headless = {} - --- run busted -return pcall(require("busted.runner"), { - standalone = false, -}) or os.exit(1)