Skip to content

Commit b1821ca

Browse files
committed
ci: tests using minit
1 parent f47ab69 commit b1821ca

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

tests/busted.lua

+3-22
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
#!/usr/bin/env -S nvim -l
22

3-
-- set stdpaths to use .tests
4-
local root = vim.fn.fnamemodify("./.tests", ":p")
5-
for _, name in ipairs({ "config", "data", "state", "cache" }) do
6-
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
7-
end
8-
93
vim.opt.rtp:prepend(".")
104

11-
vim.o.loadplugins = true -- enable since nvim -l disables plugins
12-
135
-- Setup lazy.nvim
14-
require("lazy").setup({
15-
spec = {
16-
"lunarmodules/busted", -- add busted
17-
},
18-
rocks = { hererocks = true },
6+
require("lazy.minit").busted({
7+
spec = {},
8+
stdpath = ".tests",
199
})
20-
21-
local Config = require("lazy.core.config")
22-
-- disable termnial output for the tests
23-
Config.options.headless = {}
24-
25-
-- run busted
26-
return pcall(require("busted.runner"), {
27-
standalone = false,
28-
}) or os.exit(1)

0 commit comments

Comments
 (0)