Skip to content

Commit

Permalink
fix: handle junit4 test results
Browse files Browse the repository at this point in the history
  • Loading branch information
atm1020 committed Dec 5, 2024
1 parent 95cf827 commit 8c3f525
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# neotest-jdtls
* This plugin provides a jdtls adapter for the [Neotest](https://github.com/rcarriga/neotest) framework.
* Only supports Junit5 tests.
* Supports Junit5, Junit4 tests.

### Installation

Expand Down
4 changes: 4 additions & 0 deletions lua/neotest-jdtls/neotest/impl/results.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ function M.results(spec, _, tree)
for _, item in ipairs(report) do
if item.children then
group_and_map_test_results(test_result_lookup, item)
elseif item.is_suite ~= nil and not item.is_suite then
-- The junit 4 test dosen't have children parameter
local key = get_test_key_from_junit_result(item.test_name)
test_result_lookup[key] = { map_to_neotest_result_item(item) }
end
end

Expand Down

0 comments on commit 8c3f525

Please sign in to comment.