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:

  • "My script works manually but fails in CI"
Related skills
Installs
35
GitHub Stars
52
First Seen
Feb 17, 2026