27 lines
579 B
Lua
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",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|