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 {
|
return {
|
||||||
'nvim-neotest/neotest',
|
'nvim-neotest/neotest',
|
||||||
|
-- until https://github.com/nvim-neotest/neotest/issues/531 is fixed!
|
||||||
|
-- commit = '52fca67',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-neotest/nvim-nio',
|
'nvim-neotest/nvim-nio',
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
@@ -10,8 +12,18 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require('neotest').setup {
|
require('neotest').setup {
|
||||||
adapters = {
|
adapters = {
|
||||||
require 'neotest-jest' {},
|
require 'neotest-jest' {
|
||||||
|
-- jestCommand = 'npx jest --',
|
||||||
|
-- jestArguments = function(defaultArguments) return defaultArguments end,
|
||||||
|
-- cwd = function() return vim.fn.getcwd() end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
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