Skip to content

Commit 119b16d

Browse files
Migrate from neotest-go to neotest-golang adapter with gotestsum runner
This commit performs a significant update to the Go testing adapter configuration by replacing the deprecated 'neotest-go' adapter with the newer 'fredrikaverpil/neotest-golang' adapter, which offers improved compatibility and features for modern Go development. The adapter key is changed from 'neotest-go' to 'neotest-golang' to match the updated plugin naming convention. The runner is switched from the basic 'go test' command to 'gotestsum', which provides enhanced test output formatting, parallel execution capabilities, and better integration with CI/CD systems through features like JUnit XML output and test result summarization. The previous experimental test_table configuration and custom args for test count, timeout, and verbosity are removed in favor of gotestsum's default, more robust handling of these aspects. This migration ensures that Go tests run with improved performance, better error reporting, and more reliable execution, particularly beneficial for large Go codebases and projects requiring comprehensive test reporting.
1 parent 4de5d44 commit 119b16d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lua/plugins/neotest-plugin.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@ return {
4444
return file_path:match("test_.*%.py") or file_path:match(".*_test%.py")
4545
end,
4646
},
47-
["neotest-go"] = {
48-
runner = "go test",
49-
experimental = {
50-
test_table = true,
51-
},
52-
args = { "-count=1", "-timeout=60s", "-v" }
47+
["neotest-golang"] = {
48+
runner = "gotestsum",
5349
},
5450
},
5551
status = { virtual_text = true },

0 commit comments

Comments
 (0)