Release 0.32.0
🔧 New features
Auto-discover coverage paths
Coverage now discovers source files from test file names, so most projects do not need to set --coverage-paths.
bash
bashunit --coverage --coverage-paths src/ tests/unit/assert_test.shbash
bashunit --coverage tests/unit/assert_test.sh
# Automatically tracks src/assert.shThe convention maps tests/unit/foo_test.sh to src/foo.sh.
Better HTML coverage reports
The HTML coverage report has been improved with better styling and now correctly handles namespaced functions with colons (e.g., bashunit::assert::equals).
Additionally, --coverage-report-html now defaults to coverage/html when no directory is specified:
bash
bashunit tests --coverage-report-html
# Output goes to coverage/html/Refined hook output display
Hook output now displays with right-aligned timing and a bullet prefix:
Running set_up_before_script... done (2.03s)● set_up_before_script 2.03s🐛 Bug fixes
- Coverage now excludes control flow keywords (
then,else,fi,do,done,esac,;;, case patterns) from line tracking - Coverage HTML report correctly handles namespaced functions with colons
- Coverage data no longer lost when running
coverage_test.shalongside other tests
See the full changelog on GitHub