Skip to content

Commit e6d2407

Browse files
committed
fix(summary): avoid rendering file if no tests
1 parent 3fa144f commit e6d2407

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

autoload/ultest/summary.vim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ function! s:RenderSummary() abort
125125
let structure = getbufvar(test_file, "ultest_file_structure")
126126
let tests = getbufvar(test_file, "ultest_tests", {})
127127
let results = getbufvar(test_file, "ultest_results", {})
128-
let state = {"lines": lines, "matches": matches, "tests": tests, "results": results }
129-
call s:RenderGroup("", structure, 0, state)
130-
if test_file != g:ultest_buffers[-1]
131-
call add(lines, "")
128+
if tests != {}
129+
let state = {"lines": lines, "matches": matches, "tests": tests, "results": results }
130+
call s:RenderGroup("", structure, 0, state)
131+
if test_file != g:ultest_buffers[-1]
132+
call add(lines, "")
133+
endif
132134
endif
133135
endfor
134136
if has("nvim")

0 commit comments

Comments
 (0)