bats-testing
Installation
SKILL.md
Testing with Bats
Overview
Bats is best when correctness depends on real shell behavior: exit codes, stdout/stderr, sourced functions, and external commands.
Core principle: test behavior at the shell boundary, not implementation details.
When to Use
Use this skill when you need to:
- Write e2e tests for CLI tools
- Test Bash libraries that are
sourced (not executed) - Use Bats as a shell-native REST API test runner with
curl+jq
Typical symptoms: