Update tools for testing lua plugins
parent
3a949c94ef
commit
0caec65ecf
|
@ -17,3 +17,7 @@ vim.keymap.set("n", "<Leader>tg", ":TestVisit<CR>", opts)
|
||||||
vim.api.nvim_create_user_command("PlenaryTestFile", function()
|
vim.api.nvim_create_user_command("PlenaryTestFile", function()
|
||||||
require("plenary.test_harness").test_directory(vim.fn.expand("%:p"))
|
require("plenary.test_harness").test_directory(vim.fn.expand("%:p"))
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("PlenaryTestFileWithLocalMinInit", function()
|
||||||
|
require("plenary.test_harness").test_directory(vim.fn.expand("%:p"), { minimal_init = "tests/minimal.vim" })
|
||||||
|
end, {})
|
||||||
|
|
|
@ -272,9 +272,9 @@ local lua_vim_plugin_config = {
|
||||||
},
|
},
|
||||||
["lua/*.lua"] = {
|
["lua/*.lua"] = {
|
||||||
type = "source",
|
type = "source",
|
||||||
alternate = "tests/{}.lua",
|
alternate = "tests/{}_spec.lua",
|
||||||
},
|
},
|
||||||
["tests/*.lua"] = {
|
["tests/*_spec.lua"] = {
|
||||||
type = "test",
|
type = "test",
|
||||||
alternate = "lua/{}.lua",
|
alternate = "lua/{}.lua",
|
||||||
template = {
|
template = {
|
||||||
|
|
Loading…
Reference in New Issue