add testing
This commit is contained in:
26
nvim/lua/plugins/neotest-adapters.lua
Normal file
26
nvim/lua/plugins/neotest-adapters.lua
Normal file
@ -0,0 +1,26 @@
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user