From 92db73580a79abe8ab7d9ce8f33bfac299bb045f Mon Sep 17 00:00:00 2001 From: Jonathan Elize Date: Thu, 24 Oct 2024 20:49:42 -0500 Subject: [PATCH] feat: add raw test results to after_test callback --- lua/jdtls/dap.lua | 4 ++-- lua/jdtls/junit.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/jdtls/dap.lua b/lua/jdtls/dap.lua index 78fc72a..f52b4a2 100644 --- a/lua/jdtls/dap.lua +++ b/lua/jdtls/dap.lua @@ -482,10 +482,10 @@ local function run(lens, config, context, opts) server:shutdown() server:close() end - local items = test_results.show(lens) + local items, tests = test_results.show(lens) maybe_repeat(lens, config, context, opts, items) if opts.after_test then - opts.after_test(items) + opts.after_test(items, tests) end end; }) diff --git a/lua/jdtls/junit.lua b/lua/jdtls/junit.lua index 3a9b7f2..ff05d74 100644 --- a/lua/jdtls/junit.lua +++ b/lua/jdtls/junit.lua @@ -234,7 +234,7 @@ function M.mk_test_results(bufnr) else print('Tests finished. Results printed to dap-repl.', success_symbol, #tests, 'succeeded') end - return items + return items, tests end, mk_reader = function(sock) return vim.schedule_wrap(mk_buf_loop(sock, handle_buffer))