feat: added opts.headless to control ansi output when running headless

This commit is contained in:
Folke Lemaitre 2024-06-26 21:38:28 +02:00
parent 93b3a77286
commit a0a51c06c2
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 153 additions and 10 deletions

View file

@ -6,22 +6,22 @@ for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- -- Bootstrap lazy.nvim
-- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-- if not (vim.uv or vim.loop).fs_stat(lazypath) then
-- local lazyrepo = "https://github.com/folke/lazy.nvim.git"
-- vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
-- end
-- vim.opt.rtp:prepend(lazypath)
vim.opt.rtp:prepend(".")
vim.o.loadplugins = true -- enable since nvim -l disables plugins
-- Setup lazy.nvim
require("lazy").setup({
"lunarmodules/busted", -- add busted
spec = {
"lunarmodules/busted", -- add busted
},
rocks = { hererocks = true },
})
local Config = require("lazy.core.config")
-- disable termnial output for the tests
Config.options.headless = {}
-- run busted
return pcall(require("busted.runner"), {
standalone = false,