Skip to content

Commit

Permalink
core: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Oct 13, 2024
1 parent ba8a4ef commit 929eac4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/neotest-golang/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ local runner_defaults = {
build_spec = function(args)
return M.build_gotest_spec(args)
end,
---@param cmd_data TestCommandData
cmd = function(cmd_data)
local cmd = { "go", "test", "-json" }
local go_test_args = defaults.go_test_args
Expand Down Expand Up @@ -61,8 +62,10 @@ local runner_defaults = {
},
gotestsum = {
build_spec = function(args)
-- gotestsum uses the same logic to build the runspec as the 'go' runner
return M.build_gotest_spec(args)
end,
---@param cmd_data TestCommandData
cmd = function(cmd_data)
local async = require("neotest.async")
local json_filepath = vim.fs.normalize(async.fn.tempname())
Expand Down Expand Up @@ -101,6 +104,7 @@ local runner_defaults = {
return cmd, json_filepath
end,
results = function(spec, result, tree)
-- gotestsum uses the same logic to process the results as the 'go' runner
return M.process_gotest_results(spec, result, tree)
end,
},
Expand Down

0 comments on commit 929eac4

Please sign in to comment.