mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
improve neotest
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
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',
|
||||
@@ -10,8 +12,18 @@ return {
|
||||
config = function()
|
||||
require('neotest').setup {
|
||||
adapters = {
|
||||
require 'neotest-jest' {},
|
||||
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' },
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user