From ab848cf5ed55ecf9ed7f99c6b7524cd09e8e8293 Mon Sep 17 00:00:00 2001 From: Sergii Getman Date: Sat, 24 Feb 2024 13:16:38 +0000 Subject: [PATCH] Fix json output --- lua/neotest-go/output.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-go/output.lua b/lua/neotest-go/output.lua index bc63f6b..1a7c1d6 100644 --- a/lua/neotest-go/output.lua +++ b/lua/neotest-go/output.lua @@ -58,9 +58,9 @@ function M.marshal_gotest_output(lines) -- if a new file and line number is present in the current line, use this info from now on -- begin collection log data with everything after the file:linenumber local new_test_file, new_line_number = utils.get_test_file_info(parsed.Output) + testfile, linenumber = new_test_file, new_line_number if new_test_file and new_line_number then - testfile = new_test_file - linenumber = new_line_number + if not tests[testname].file_output[testfile] then tests[testname].file_output[testfile] = {} end