dotfiles/nvim/lua/plugins/neotest-adapters.lua
Markus Dieckmann 22eabac158 add testing
2023-12-21 16:24:05 +01:00

27 lines
579 B
Lua

return {
{ "nvim-neotest/neotest-jest" },
{
"nvim-neotest/neotest",
opts = function(_, opts)
table.insert(
opts.adapters,
require("neotest-jest")({
jestCommand = "npm test --",
jestConfig = "jest.config.js",
env = { CI = true },
cwd = function()
return vim.fn.getcwd()
end,
})
)
end,
keys = {
{
"<leader>tw",
"<cmd>lua require('neotest').run.run({ jestCommand = 'jest --watch ' })<cr>",
desc = "Jest Watch",
},
},
},
}