feat(runner): --fail-on-risky to fail tests with no assertions#629
Merged
Chemaclass merged 2 commits intomainfrom Apr 19, 2026
Merged
feat(runner): --fail-on-risky to fail tests with no assertions#629Chemaclass merged 2 commits intomainfrom
Chemaclass merged 2 commits intomainfrom
Conversation
Tests without assertions are currently reported as risky warnings. The new --fail-on-risky flag (and BASHUNIT_FAIL_ON_RISKY env var) opts into strict behavior: such tests are recorded as failures and the suite exits with a non-zero status. Default stays unchanged. Closes #115
Contributor
✅ Contributor ReportUser: @Chemaclass This user is on the trusted contributors list and was automatically approved. |
The upgrade test hit another failure mode on Alpine: the upgrade command itself produced no output (transient network/download failure). Mirror the existing guard on the version check and skip the test instead of failing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
Related #115
Tests with zero assertions are currently shown as risky warnings but don't fail the suite. Some users want stricter behavior where a missing assertion counts as a test failure (closer to PHPUnit
--fail-on-risky).💡 Changes
--fail-on-riskyCLI flag andBASHUNIT_FAIL_ON_RISKYenv var (defaultfalse)docs/command-line.md,docs/configuration.md,.env.example, and thetest --helpoutput