feat: set up testing correctly
This commit is contained in:
parent
82e5ecee41
commit
3178578127
@ -1,33 +1,49 @@
|
||||
return {
|
||||
{
|
||||
'nvim-neotest/neotest',
|
||||
config = function ()
|
||||
require('neotest').setup({
|
||||
"nvim-neotest/neotest",
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require('neotest-jest')({
|
||||
require("neotest-jest")({
|
||||
jestCommand = "npm test --",
|
||||
jestConfigFile = "custom.jest.config.ts",
|
||||
cwd = function(path)
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
}),
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-neotest/nvim-nio',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'antoinemadec/FixCursorHold.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'nvim-neotest/neotest-jest'
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-neotest/neotest-jest",
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>tt', function() require("neotest").run.run() end }
|
||||
}
|
||||
{
|
||||
"<leader>tt",
|
||||
function()
|
||||
require("neotest").run.run()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<leader>ts",
|
||||
function()
|
||||
require("neotest").summary.open()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'andythigpen/nvim-coverage',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
event = 'VeryLazy'
|
||||
}
|
||||
"andythigpen/nvim-coverage",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
cmd = { "Coverage", "CoverageToggle", "CoverageSummary", "CoverageHide", "CoverageClear", "CoverageLoadLcov" },
|
||||
keys = {
|
||||
{ "<leader>tc", "<cmd>CoverageToggle<CR>", desc = "Toggle test coverage" },
|
||||
{ "<leader>ti", "<cmd>CoverageToggle<CR>", desc = "Summarize test coverage" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user