Skip to content

Commit

Permalink
chore: sync variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jun 15, 2024
1 parent a179df6 commit 3e1adaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion lua/neotest-golang/results_dir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ function M.decorate_with_go_test_results(res, gotest_output)
elseif line.Action == "fail" then
test_data.status = "failed"
elseif line.Action == "output" then
-- append line.Output to output field
test_data.gotest_data.output =
vim.list_extend(test_data.gotest_data.output, { line.Output })

Expand Down
6 changes: 4 additions & 2 deletions lua/neotest-golang/results_test.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local async = require("neotest.async")

local json = require("neotest-golang.json")

local M = {}

--- @async
Expand Down Expand Up @@ -37,9 +39,9 @@ function M.results(spec, result, tree)
--- @type neotest.Error[]
local errors = {}
--- @type table
local jsonlines = require("neotest-golang.json").process_json(raw_output)
local gotest_output = json.process_json(raw_output)

for _, line in ipairs(jsonlines) do
for _, line in ipairs(gotest_output) do
if line.Action == "output" and line.Output ~= nil then
-- record output, prints to output panel
table.insert(test_result, line.Output)
Expand Down

0 comments on commit 3e1adaa

Please sign in to comment.