Skip to content

fix(result_builder): match single-test results to discovered IDs - #339

Merged
rcasia merged 2 commits into
mainfrom
t3code/reproduce-issue-unit-test
Sep 30, 2026
Merged

rcasia merged 2 commits into
mainfrom
t3code/reproduce-issue-unit-test

Conversation

@rcasia

@rcasia rcasia commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #338.

JUnit Vintage reports a plain method as demo, while discovery identifies it as demo(). Previously, the single-testcase branch returned the report ID directly, leaving Neotest unable to associate a passing result with the discovered test node. A parameterized method with only one invocation had the same problem.

  • Share ID matching between single-testcase results and merged parameterized results.
  • Prefer an exact discovered ID, then match the class and method name without the parameter signature.
  • Preserve single-test failure details and existing fallback behavior for unmatched single results.
  • Cover plain Vintage tests, failures on a selected method, single parameterized invocations (Vintage and shortened parameter types), and exact-match precedence.
  • Update the result-flow documentation and external tree type annotations.

Verification

  • Confirmed the original regression test failed before the fix and passes afterward.
  • make test: all 194 cases pass.
  • stylua --check .: passes.
  • Luacheck and all applicable pre-commit hooks, including the test hook: pass.
  • lua-language-server --check .: no problems found.
  • All 16 GitHub checks pass, including the unit/integration and E2E matrices on Ubuntu and Windows for Neovim stable, v0.11.7, and nightly.

The PR remains a draft; it now includes the production fix as well as the regression tests.

@rcasia rcasia changed the title test(result_builder): reproduce single-test ID mismatch fix(result_builder): match single-test results to discovered IDs Sep 30, 2026
@rcasia
rcasia marked this pull request as ready for review September 30, 2026 12:50
@rcasia
rcasia merged commit 51a1389 into main Sep 30, 2026
18 checks passed
@rcasia
rcasia deleted the t3code/reproduce-issue-unit-test branch September 30, 2026 13:04
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.

[BUG] Wrong test status reported

1 participant