return { 'nvim-neotest/neotest', dependencies = { 'haydenmeade/neotest-jest', 'marilari88/neotest-vitest' }, cmd = 'Neotest', config = function() require('neotest').setup({ status = { virtual_text = true }, output = { open_on_run = true }, adapters = { require('neotest-vitest'), require('neotest-jest')({ jestCommand = 'npm test --', jestConfigFile = 'custom.jest.config.ts', env = { CI = true }, cwd = function(path) return vim.fn.getcwd() end, }), }, }) end, keys = { { 'tw', function() require('neotest').run.run(vim.fn.expand('%')) end, desc = 'Run File', }, { 'tT', function() require('neotest').run.run(vim.loop.cwd()) end, desc = 'Run All Test Files', }, { 'tr', function() require('neotest').run.run() end, desc = 'Run Nearest', }, { 'ts', function() require('neotest').summary.toggle() end, desc = 'Toggle Summary', }, { 'to', function() require('neotest').output.open({ enter = true, auto_close = true }) end, desc = 'Show Output', }, { 'tO', function() require('neotest').output_panel.toggle() end, desc = 'Toggle Output Panel', }, { 'tS', function() require('neotest').run.stop() end, desc = 'Stop', }, }, }