From efc72b06496f7540085928094808e9a0f45222b9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 27 May 2023 09:37:55 +0200 Subject: [PATCH] feat(neotest): added `tt` and `tT` to run tests in file or all test files --- lua/lazyvim/plugins/extras/test/core.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/extras/test/core.lua b/lua/lazyvim/plugins/extras/test/core.lua index a331cc7c..bb83deff 100644 --- a/lua/lazyvim/plugins/extras/test/core.lua +++ b/lua/lazyvim/plugins/extras/test/core.lua @@ -22,6 +22,8 @@ return { -- args = { "-tags=integration" }, -- }, -- }, + status = { virtual_text = true }, + output = { open_on_run = true }, quickfix = { open = function() if require("lazyvim.util").has("trouble.nvim") then @@ -73,6 +75,8 @@ return { end, -- stylua: ignore keys = { + { "tt", 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" }, { "tR", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" },