bats-support is a supporting library for Bats (Bash Automated Testing System) test helpers, providing common functions for error reporting, output formatting, and language tools. Version 0.3.0 is the latest stable release with no active maintenance cadence announced. It serves as a dependency for higher-level assertion libraries like bats-assert, focusing on internal helper utilities rather than end-user assertions. Key differentiators include its lightweight shell implementation, strict adherence to Bats conventions, and compatibility with both Bats 0.4 and 1.x. The library was renamed from bats-core to bats-support, with GitHub redirects ensuring backward compatibility.
npm install bats-supportVerified import paths — ran on the pinned version, not inferred.
Demonstrates loading bats-support, using fail helper for custom error messages, and batslib_is_caller for call stack inspection.
Update git submodule and file references to the new repository URL: https://github.com/bats-core/bats-support.git
Replace with: load 'bats-support/load'
Always supply a message argument unless you intentionally want to pipe input.
Install bats-support via git submodule or npm, and ensure BATS_LIB_PATH includes the parent directory of bats-support.
Update bats-support to version 0.2.0 or later which introduced --indirect.
Ensure 'load bats-support/load' is placed before any calls to bats-support functions.