nvim-neotest / neotest-go

MIT License
125 stars 43 forks source link

feat(output): add compiler build message & global file output #27

Open Davincible opened 1 year ago

Davincible commented 1 year ago

Fix #25

Solution; track non json compiler output lines in a separate table as a build message. Add it at the top of the output of every test, as this is also what would happen if you run manually, and build messages are relevant for all output.

Tests with compiler output now run as normal, whereas previously they would always fail.

Example: image

(colorization requires #26)

Davincible commented 1 year ago

What is progress here? I saw its filled with run/output/status for each line. Didn't anything for build message there, not sure if its necessary

          tests[testname] = {
            output = {},
            progress = {},
            file_output = {},
          }
Davincible commented 1 year ago

Now also fixed global output. Meaning; previously if you opened the output with the cursor outside of a test function it would show json-like output, which I found annoying, so I added a file output, which aggregates all the test outputs from per file.

Added it to this PR as the changes go together with the build message changes.

fredrikaverpil commented 3 months ago

@sergii4 I have a feeling this got fixed by #54 ...?

However, I haven't really looked into this PR much, and whether it would somehow help with #52