chore: setup mini.test
This commit is contained in:
parent
e71f5937fc
commit
42a880ab95
5 changed files with 24 additions and 12 deletions
|
|
@ -19,6 +19,11 @@ local function install_plug(plugin)
|
|||
end
|
||||
end
|
||||
|
||||
vim.env.XDG_CONFIG_HOME = root ".tests/config"
|
||||
vim.env.XDG_DATA_HOME = root ".tests/data"
|
||||
vim.env.XDG_STATE_HOME = root ".tests/state"
|
||||
vim.env.XDG_CACHE_HOME = root ".tests/cache"
|
||||
|
||||
vim.cmd [[set runtimepath=$VIMRUNTIME]]
|
||||
vim.opt.runtimepath:append(root())
|
||||
vim.opt.packpath = { root ".tests/site" }
|
||||
|
|
@ -28,7 +33,15 @@ install_plug "nvim-lua/plenary.nvim"
|
|||
install_plug "nvim-treesitter/nvim-treesitter"
|
||||
install_plug "echasnovski/mini.doc" -- used for docs generation
|
||||
|
||||
vim.env.XDG_CONFIG_HOME = root ".tests/config"
|
||||
vim.env.XDG_DATA_HOME = root ".tests/data"
|
||||
vim.env.XDG_STATE_HOME = root ".tests/state"
|
||||
vim.env.XDG_CACHE_HOME = root ".tests/cache"
|
||||
-- setup mini.test only when running headless nvim
|
||||
if #vim.api.nvim_list_uis() == 0 then
|
||||
install_plug "echasnovski/mini.test"
|
||||
|
||||
require("mini.test").setup {
|
||||
collect = {
|
||||
find_files = function()
|
||||
return vim.fn.globpath("spec", "**/*_test.lua", true, true)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue