Skip to content

Commit

Permalink
chore: cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymorelli96 committed Oct 25, 2024
1 parent 429f83e commit e64292c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/neotest-golang/process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ function M.decorate_with_go_test_results(res, gotest_output)
return res
end

--- Colorize the test output based on the test result.
---
--- Colorize the test output based on the test result.
---
--- It will colorize the test output line based on the test result (PASS - green, FAIL - red, SKIP - yellow).
--- @param output string
--- @return string
Expand All @@ -347,11 +347,11 @@ function M.colorizer(output)
end

if string.find(output, "FAIL") then
output = output:gsub("^", "[31m"):gsub("$", "[0m") -- colorizer red
output = output:gsub("^", "[31m"):gsub("$", "[0m")
elseif string.find(output, "PASS") then
output = output:gsub("^", "[32m"):gsub("$", "[0m") -- colorizer green
output = output:gsub("^", "[32m"):gsub("$", "[0m")
elseif string.find(output, "SKIP") then
output = output:gsub("^", "[33m"):gsub("$", "[0m") -- colorizer yellow
output = output:gsub("^", "[33m"):gsub("$", "[0m")
end
return output
end
Expand Down Expand Up @@ -413,7 +413,6 @@ function M.to_neotest_result(res)
errors = test_data.errors,
output = test_output_path, -- NOTE: could be slow when running many tests?
}
vim.notify(vim.inspect(neotest_result[pos_id]))
end

return neotest_result
Expand Down

0 comments on commit e64292c

Please sign in to comment.