Skip to content

feat(runner): --fail-on-risky to fail tests with no assertions#629

Merged
Chemaclass merged 2 commits intomainfrom
feat/115-no-assertion-test-should-fail
Apr 19, 2026
Merged

feat(runner): --fail-on-risky to fail tests with no assertions#629
Chemaclass merged 2 commits intomainfrom
feat/115-no-assertion-test-should-fail

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 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

  • Add --fail-on-risky CLI flag and BASHUNIT_FAIL_ON_RISKY env var (default false)
  • When enabled, risky tests are recorded as failures in both serial and parallel runners
  • Document flag and env var in docs/command-line.md, docs/configuration.md, .env.example, and the test --help output
  • Update CHANGELOG under Unreleased
  • Add acceptance tests covering flag, env var, and parallel execution

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
@Chemaclass Chemaclass added the enhancement New feature or request label Apr 19, 2026
@Chemaclass Chemaclass self-assigned this Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ Contributor Report

User: @Chemaclass
Status: Trusted contributor (whitelisted)

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.
@Chemaclass Chemaclass merged commit ba36df0 into main Apr 19, 2026
30 checks passed
@Chemaclass Chemaclass deleted the feat/115-no-assertion-test-should-fail branch April 19, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant