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
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
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
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: Did you check docs and existing issues?
|
label: Did you check docs and existing issues?
|
||||||
|
@ -57,32 +60,14 @@ body:
|
||||||
label: Repro
|
label: Repro
|
||||||
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
||||||
value: |
|
value: |
|
||||||
-- DO NOT change the paths and don't remove the colorscheme
|
vim.env.LAZY_STDPATH = ".repro"
|
||||||
local root = vim.fn.fnamemodify("./.repro", ":p")
|
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
|
||||||
|
|
||||||
-- set stdpaths to use .repro
|
require("lazy.minit").repro({
|
||||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
spec = {
|
||||||
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
-- add any other plugins here
|
||||||
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",
|
|
||||||
-- add any other plugins here
|
|
||||||
}
|
|
||||||
require("lazy").setup(plugins, {
|
|
||||||
root = root .. "/plugins",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.cmd.colorscheme("tokyonight")
|
|
||||||
-- add anything else here
|
|
||||||
render: Lua
|
render: Lua
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -25,6 +25,9 @@ function M.setup(opts)
|
||||||
opts = M.extend({
|
opts = M.extend({
|
||||||
local_spec = false,
|
local_spec = false,
|
||||||
change_detection = { enabled = false },
|
change_detection = { enabled = false },
|
||||||
|
dev = {
|
||||||
|
patterns = vim.env.LAZY_DEV and vim.split(vim.env.LAZY_DEV, ",") or nil,
|
||||||
|
},
|
||||||
}, opts)
|
}, opts)
|
||||||
|
|
||||||
local args = {}
|
local args = {}
|
||||||
|
@ -121,10 +124,19 @@ function M.minitest.run()
|
||||||
is_not = {
|
is_not = {
|
||||||
same = expect.no_equality,
|
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.__index = Assert
|
||||||
-- assert = require("luassert")
|
|
||||||
assert = setmetatable({}, Assert)
|
assert = setmetatable({}, Assert)
|
||||||
|
assert = require("luassert")
|
||||||
require("mini.test").run()
|
require("mini.test").run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -132,6 +144,7 @@ end
|
||||||
function M.minitest.setup(opts)
|
function M.minitest.setup(opts)
|
||||||
return M.extend({
|
return M.extend({
|
||||||
spec = {
|
spec = {
|
||||||
|
"lunarmodules/luassert",
|
||||||
{
|
{
|
||||||
"echasnovski/mini.test",
|
"echasnovski/mini.test",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
Loading…
Reference in New Issue