dotfiles/nvim/lua/plugins/neotest-adapters.lua

27 lines
579 B
Lua
Raw Normal View History

2023-12-21 16:24:05 +01:00
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",
},
},
},
}