github TypedDevs/bashunit 0.28.0

21 hours ago

Added inline test filtering, a redesigned subcommand-based CLI, safer lifecycle behavior, and runner performance.

✨ Improvements

  • Added inline filter syntax to run specific tests directly from a file:
    • path::function_name — run only the matching test function
    • path:line_number — execute the test located at the specified line
  • Added --show-skipped and --show-incomplete options to surface test outcomes that previously remained hidden
    • Displays skipped and incomplete tests in a dedicated summary section

🛠️ Changes

  • BREAKING: Introduced a modern subcommand-based CLI architecture
    Provides clearer workflows and replaces several legacy flags:
    • bashunit test [path] — run tests (default; backward-compatible with bashunit [path])
    • bashunit bench [path] — run benchmarks (replaces --bench)
    • bashunit doc [filter] — show assertion documentation (replaces --doc)
    • bashunit init [dir] — bootstrap a project (replaces --init)
    • bashunit learn — interactive tutorial (replaces --learn)
    • bashunit upgrade — upgrade to the latest version (replaces --upgrade)
  • BREAKING: Tests now stop at the first assertion failure within a test function
    • Aligns with PHPUnit and Jest default behavior
    • Skips remaining assertions in the same test after a failure
    • Independent test functions continue to run normally

🐞 Bug Fixes

  • Lifecycle hooks (set_up, tear_down) now stop executing remaining commands after the first failure
  • If set_up_before_script fails, all tests are correctly marked as failed

⚡ Performance

  • Optimized assertion guard logic using integer comparison instead of string comparison for faster evaluation

👥 Contributors

@Chemaclass @JesusValeraDev

🔐 Checksum

31cbc589a0938e33cd5eacd8028afbb681601b40696af5989e7a788dab208b79 bin/bashunit

Full Changelog: 0.27.0...0.28.0

Don't miss a new bashunit release

NewReleases is sending notifications on new releases.