Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show compilation failure as test output #176

Merged
merged 15 commits into from
Sep 9, 2024
Merged

Conversation

fredrikaverpil
Copy link
Owner

@fredrikaverpil fredrikaverpil commented Sep 6, 2024

fixes #169

Why this change?

  • When there's e.g. a compilation error, this is not properly handled. Often the error shown is "Test(s) not associated" which is not very clear.

What was changed?

  • Make go list failure show as Neotest test failure.
  • Make go test failure show as a Neotest test failure. Supports both go and gotestsum runners.
  • Added ability to pass various errors onto the RunSpec context.

Screenshot

image

Try it out

{
  "fredrikaverpil/neotest-golang",
  branch = "output-on-failure",
},

@fredrikaverpil fredrikaverpil self-assigned this Sep 6, 2024
@fredrikaverpil fredrikaverpil force-pushed the output-on-failure branch 4 times, most recently from ae4b4b0 to a45d01a Compare September 7, 2024 15:37
@fredrikaverpil
Copy link
Owner Author

I noticed a problem where this change now introduces a regression where all sub-tests are marked as failed eventhough some of are passing (when executing a top-level test).

I would like to try to address this before merging.

@fredrikaverpil
Copy link
Owner Author

I noticed a problem where this change now introduces a regression where all sub-tests are marked as failed eventhough some of are passing (when executing a top-level test).

Ok, I believe I fixed this.

@fredrikaverpil fredrikaverpil force-pushed the output-on-failure branch 4 times, most recently from 19023de to 491bf4e Compare September 8, 2024 21:24
@fredrikaverpil fredrikaverpil enabled auto-merge (squash) September 9, 2024 15:14
@fredrikaverpil fredrikaverpil merged commit 4c95fac into main Sep 9, 2024
7 of 9 checks passed
@fredrikaverpil fredrikaverpil deleted the output-on-failure branch September 9, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: report an error if -race is not working
1 participant