add TSamLast command for reexecuting last running tests

This commit is contained in:
2025-12-25 14:30:34 +01:00
parent 51ec535eac
commit cbc3e201ae
8 changed files with 260 additions and 4 deletions

View File

@@ -19,6 +19,10 @@ vim.api.nvim_create_user_command("TSamAll", function()
require("test-samurai").test_all()
end, { desc = "test-samurai: run all tests in project (per runner)" })
vim.api.nvim_create_user_command("TSamLast", function()
require("test-samurai").test_last()
end, { desc = "test-samurai: rerun last test command" })
vim.keymap.set("n", "<leader>tn", function()
require("test-samurai").test_nearest()
end, { desc = "test-samurai: run nearest test" })
@@ -34,3 +38,7 @@ end, { desc = "test-samurai: run all tests in current file" })
vim.keymap.set("n", "<leader>ta", function()
require("test-samurai").test_all()
end, { desc = "test-samurai: run all tests in project (per runner)" })
vim.keymap.set("n", "<leader>tl", function()
require("test-samurai").test_last()
end, { desc = "test-samurai: rerun last test command" })