mirror of https://github.com/folke/lazy.nvim.git
ci: add luassert to minitest for now
This commit is contained in:
parent
070418dca1
commit
54f70c757c
|
@ -6,7 +6,10 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim) and search [existing issues](https://github.com/folke/lazy.nvim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed.
|
||||
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim)
|
||||
and search [existing issues](https://github.com/folke/lazy.nvim/issues).
|
||||
|
||||
Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Did you check docs and existing issues?
|
||||
|
@ -57,32 +60,14 @@ body:
|
|||
label: Repro
|
||||
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
||||
value: |
|
||||
-- DO NOT change the paths and don't remove the colorscheme
|
||||
local root = vim.fn.fnamemodify("./.repro", ":p")
|
||||
vim.env.LAZY_STDPATH = ".repro"
|
||||
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
|
||||
|
||||
-- set stdpaths to use .repro
|
||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
||||
end
|
||||
|
||||
-- bootstrap lazy
|
||||
local lazypath = root .. "/plugins/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
|
||||
-- install plugins
|
||||
local plugins = {
|
||||
"folke/tokyonight.nvim",
|
||||
require("lazy.minit").repro({
|
||||
spec = {
|
||||
-- add any other plugins here
|
||||
}
|
||||
require("lazy").setup(plugins, {
|
||||
root = root .. "/plugins",
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("tokyonight")
|
||||
-- add anything else here
|
||||
render: Lua
|
||||
validations:
|
||||
required: false
|
||||
|
|
|
@ -25,6 +25,9 @@ function M.setup(opts)
|
|||
opts = M.extend({
|
||||
local_spec = false,
|
||||
change_detection = { enabled = false },
|
||||
dev = {
|
||||
patterns = vim.env.LAZY_DEV and vim.split(vim.env.LAZY_DEV, ",") or nil,
|
||||
},
|
||||
}, opts)
|
||||
|
||||
local args = {}
|
||||
|
@ -121,10 +124,19 @@ function M.minitest.run()
|
|||
is_not = {
|
||||
same = expect.no_equality,
|
||||
},
|
||||
is_not_nil = function(a)
|
||||
return expect.no_equality(nil, a)
|
||||
end,
|
||||
is_true = function(a)
|
||||
return expect.equality(true, a)
|
||||
end,
|
||||
is_false = function(a)
|
||||
return expect.equality(false, a)
|
||||
end,
|
||||
}
|
||||
Assert.__index = Assert
|
||||
-- assert = require("luassert")
|
||||
assert = setmetatable({}, Assert)
|
||||
assert = require("luassert")
|
||||
require("mini.test").run()
|
||||
end
|
||||
|
||||
|
@ -132,6 +144,7 @@ end
|
|||
function M.minitest.setup(opts)
|
||||
return M.extend({
|
||||
spec = {
|
||||
"lunarmodules/luassert",
|
||||
{
|
||||
"echasnovski/mini.test",
|
||||
opts = {
|
||||
|
|
Loading…
Reference in New Issue