github TypedDevs/bashunit 0.29.0

one day ago

Added bootstrap argument passing, stricter and more controllable execution modes, and safer internals through full namespacing.

✨ Improvements

  • Add bootstrap argument passing support via --env "file.sh arg1 arg2"
  • Add --preserve-env flag to skip .env loading and use shell environment only
  • Add -l, --login flag to run tests in login shell context
  • Add --strict flag to enable strict shell mode (set -euo pipefail) for tests
  • Add BASHUNIT_STRICT_MODE configuration option (default: false)
  • Add -R, --run-all flag to run all assertions even when one fails
  • Add BASHUNIT_STOP_ON_ASSERTION_FAILURE configuration option (default: true)

🛠️ Changes

  • BREAKING: Namespace all internal functions and variables to prevent collisions with user code
    • All helper functions now use bashunit:: prefix (e.g., skipbashunit::skip)
    • All internal functions now use bashunit:: prefix (e.g., helper::trimbashunit::helper::trim)
    • All internal variables now use _BASHUNIT_ prefix (e.g., _TESTS_PASSED_BASHUNIT_TESTS_PASSED)
    • All assert_* functions remain unchanged (public API)

🐛 Bug Fixes

  • Improve assert command output: show assert <fn> instead of internal function name in failure messages
  • Custom assertions now display the correct test function name in failure messages
  • Data providers now work when set_up_before_script changes directory
  • Subsequent test files now run when set_up_before_script changes directory
  • Catch intermediate failing commands in set_up_before_script and tear_down_after_script

👥 Contributors

@Chemaclass @JesusValeraDev @cnaples79

🔐 Checksum

90d5afc07222920777d6c47af657d1d7a80a0055eaaa506c9c814f6b224da102 bin/bashunit

Full Changelog: 0.28.0...0.29.0

Don't miss a new bashunit release

NewReleases is sending notifications on new releases.