Skip to content

Commit 328c09a

Browse files
committed
chore: check if number of tests is not 0
1 parent 5b03dca commit 328c09a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/java-core/api/test.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ end
5353
---@param config? java-dap.DapLauncherConfigOverridable config to override the default values in test launcher config
5454
function M:run_class_by_buffer(buffer, report, config)
5555
local tests = self:get_test_class_by_buffer(buffer)
56+
57+
if #tests < 1 then
58+
vim.notify('No tests found in the current buffer')
59+
return
60+
end
61+
5662
self:run_test(tests, report, config)
5763
end
5864

0 commit comments

Comments
 (0)