-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
The go test -json
package has a tendency to include non-json output in some cases. For example when one (distant) sub-package doesn't compile. As a result of this, if I have one not-compiling file in my whole project, non of my tests will report as passing, even though they pass, and the log output will not be parsed.
The problematic code is here;
neotest-go/lua/neotest-go/init.lua
Lines 220 to 226 in afb87c6
local ok, parsed = pcall(vim.json.decode, line, { luanil = { object = true } }) | |
if not ok then | |
log = vim.tbl_map(function(l) | |
return highlight_output(l) | |
end, lines) | |
return tests, log | |
end |
It happens because it now returns prematurely when one line has no valid json. We can either ignore the line here, or try to include it as is.
How do you want to handle this scenario? I can implement a fix
Bacbia3696
Metadata
Metadata
Assignees
Labels
No labels