fix: testing plugins dependencies

main
Ian Mancini 1 year ago
parent b5a068737f
commit 4053f19333

@ -299,18 +299,20 @@ return require("packer").startup(function()
-- Test runner -- Test runner
use({ use({
"haydenmeade/neotest-jest", "nvim-neotest/neotest",
"nvim-neotest/neotest-go", requires = {
"nvim-neotest/neotest-python", "nvim-lua/plenary.nvim",
{ "nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest", "antoinemadec/FixCursorHold.nvim",
requires = { -- {
"nvim-lua/plenary.nvim", -- "nvim-neotest/neotest-jest",
"nvim-treesitter/nvim-treesitter", -- commit = "219033658bf8de6b91e201036a5cc5456905d9d2",
"antoinemadec/FixCursorHold.nvim", -- },
}, "nvim-neotest/neotest-jest",
config = [[require('plugins.testing')]], "nvim-neotest/neotest-go",
"nvim-neotest/neotest-python",
}, },
config = [[require('plugins.testing')]],
}) })
-- REST -- REST

@ -1,57 +1,57 @@
local wk = require("which-key") local wk = require("which-key")
require("neotest").setup({ require("neotest").setup({
adapters = { adapters = {
require("neotest-jest"), require("neotest-jest"),
require("neotest-python"), require("neotest-python"),
require("neotest-go"), require("neotest-go"),
}, },
}) })
local run_current_test_keybiding = { local run_current_test_keybiding = {
function() function()
require("neotest").run.run() require("neotest").run.run()
end, end,
"Current test", "Current test",
} }
local keybindings = { local keybindings = {
name = "Test", name = "Test",
t = run_current_test_keybiding, t = run_current_test_keybiding,
T = { T = {
function() function()
require("neotest").run.run(vim.fn.expand("%")) require("neotest").run.run(vim.fn.expand("%"))
end, end,
"Current file", "Current file",
}, },
d = { d = {
function() function()
require("neotest").run.run({ strategy = "dap" }) require("neotest").run.run({ strategy = "dap" })
end, end,
"Debug current test", "Debug current test",
}, },
s = { s = {
function() function()
require("neotest").run.stop() require("neotest").run.stop()
end, end,
"Stop running test", "Stop running test",
}, },
a = { a = {
function() function()
require("neotest").run.attach() require("neotest").run.attach()
end, end,
"Attach to running test", "Attach to running test",
}, },
} }
wk.register({ wk.register({
r = { r = {
t = run_current_test_keybiding, t = run_current_test_keybiding,
T = keybindings, T = keybindings,
}, },
c = { c = {
T = keybindings, T = keybindings,
}, },
}, { }, {
prefix = "<leader>", prefix = "<leader>",
}) })

Loading…
Cancel
Save