Skip to content

Commit 2521779

Browse files
committed
test: add end-to-end test for coverage hooks
Runs bashunit on fixture file with coverage enabled to verify the complete flow works correctly, including hook coverage attribution. Skip test in parallel mode as coverage state is not shared across workers.
1 parent 3d8b8ec commit 2521779

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/acceptance/coverage_hooks_test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ function set_up_before_script() {
77
}
88

99
function test_coverage_includes_src_hits_from_setup_hook() {
10+
# Skip in parallel mode - coverage state is not shared across workers
11+
if bashunit::env::is_parallel_run_enabled; then
12+
bashunit::skip "Coverage tests require sequential execution"
13+
return
14+
fi
15+
1016
# Enable coverage in-process and exercise code in a hook-like context
1117
BASHUNIT_COVERAGE=true
1218
BASHUNIT_COVERAGE_PATHS="src/"

0 commit comments

Comments
 (0)