mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
30 lines
1.0 KiB
Lua
30 lines
1.0 KiB
Lua
return {
|
|
'nvim-neotest/neotest',
|
|
-- until https://github.com/nvim-neotest/neotest/issues/531 is fixed!
|
|
-- commit = '52fca67',
|
|
dependencies = {
|
|
'nvim-neotest/nvim-nio',
|
|
'nvim-lua/plenary.nvim',
|
|
'antoinemadec/FixCursorHold.nvim',
|
|
'nvim-treesitter/nvim-treesitter',
|
|
'nvim-neotest/neotest-jest',
|
|
},
|
|
config = function()
|
|
require('neotest').setup {
|
|
adapters = {
|
|
require 'neotest-jest' {
|
|
-- jestCommand = 'npx jest --',
|
|
-- jestArguments = function(defaultArguments) return defaultArguments end,
|
|
-- cwd = function() return vim.fn.getcwd() end,
|
|
},
|
|
},
|
|
}
|
|
end,
|
|
keys = {
|
|
{ '<leader>ts', function() require('neotest').summary.toggle() end, desc = 'test summary toggle' },
|
|
{ '<leader>tf', function() require('neotest').run.run(vim.fn.expand '%') end, desc = 'test file' },
|
|
{ '<leader>tn', function() require('neotest').run.run() end, desc = 'test nearest test' },
|
|
{ '<leader>tt', function() require('neotest').run.run_last() end, desc = 'test last' },
|
|
},
|
|
}
|