All checks were successful
tests / test (push) Successful in 19s
test-samurai-go-runner.nvim
Go runner for test-samurai.nvim.
Main plugin: https://gitea.mschirmer.com/m13r/test-samurai.nvim
Features
- Detects Go test files (
*_test.go). - Finds nearest
Test*,Example*, andBenchmark*functions. - Builds
go testcommands for nearest, file, all, and failed-only runs. - Parses
go testoutput to list passes, failures, and skips.
Installation (lazy.nvim)
{
"m13r/test-samurai.nvim",
dependencies = {
"m13r/test-samurai-go-runner.nvim",
},
config = function()
require("test-samurai").setup({
runners = {
require("test-samurai-go-runner"),
},
})
end,
}
Local Development (lazy.nvim)
{
"m13r/test-samurai.nvim",
dependencies = {
{
"test-samurai-go-runner.nvim",
dir = "/absolute/path/to/test-samurai-go-runner.nvim",
},
},
config = function()
require("test-samurai").setup({
runners = {
require("test-samurai-go-runner"),
},
})
end,
}
Usage
Use the standard test-samurai.nvim commands (e.g. TSamNearest, TSamFile, TSamAll, TSamFailedOnly).
Notes
- Subtests (
t.Run) are reported as separate entries viago test -json -v. - Subtest selection uses anchored patterns (
^Parent$/^Sub$) to avoid matching the same subtest name in other tests. go testcannot scope execution to a single file; if two tests in the same package share the same test and subtest names, both will run.- Result lists are ordered so that parent tests appear before their subtests within each status.
Description
Languages
Lua
99.6%
Shell
0.4%