return { { "nvim-neotest/neotest", dependencies = { "nvim-neotest/nvim-nio", "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "nvim-neotest/neotest-jest", -- "marilari88/neotest-vitest", }, cmd = { "Neotest" }, keys = { { "ta", function() require("neotest").run.run(vim.fn.getcwd()) end, desc = "Run all tests" }, { "tf", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run tests in file" }, { "tn", function() require("neotest").run.run() end, desc = "Run nearest test" }, { "to", function() require("neotest").output.open({ enter = true }) end, desc = "Show test output" }, { "tS", function() require("neotest").summary.toggle() end, desc = "Toggle test summary" }, }, config = function() require("neotest").setup({ adapters = { require("neotest-jest")({ jestCommand = "npm test --", jestArguments = function(defaultArguments, context) return defaultArguments end, -- jestConfigFile = "custom.jest.config.ts", -- env = { CI = true }, cwd = function(path) return vim.fn.getcwd() end, filter_dir = function(name, rel_path, root) return name ~= "node_modules" and name ~= "dist" and name ~= "build" end, }), -- require("neotest-vitest"), }, }) end, }, }