Skip to content

refactor(runner): extract test identity and title interpolation#654

Merged
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-test-context
May 3, 2026
Merged

refactor(runner): extract test identity and title interpolation#654
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-test-context

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Continuing the run_test slim-down from #653. The opening of the function still inlined two distinct concerns (test ID + coverage env exports, and data-provider title interpolation) before getting to the actual subshell.

💡 Changes

  • Extract bashunit::runner::export_test_identity — sets BASHUNIT_CURRENT_TEST_ID and the coverage env vars
  • Extract bashunit::runner::apply_interpolated_title — handles the interpolate_function_name branch and returns the interpolated name so callers can keep using the local
  • Pure extraction, no behavior change. Existing data-provider and parallel test suites cover the path

Pull the test ID/coverage env exports and the data-provider title
interpolation block out of `bashunit::runner::run_test` into named
helpers (`export_test_identity`, `apply_interpolated_title`). The
helper returns the interpolated name so subsequent code in `run_test`
keeps the same local. Pure extraction, no behavior change.
@Chemaclass Chemaclass added the refactoring Refactoring or cleaning related label May 3, 2026
@Chemaclass Chemaclass self-assigned this May 3, 2026
@Chemaclass Chemaclass merged commit d5e85da into main May 3, 2026
30 checks passed
@Chemaclass Chemaclass deleted the refactor/runner-extract-test-context branch May 3, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Refactoring or cleaning related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant