bats-fixture-full-validation

Validates edited Bats helpers and stubs by running the full test suite and ShellCheck.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill bats-fixture-full-validation-vilnacrm-org
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bats-fixture-full-validation
Source: https://github.com/VilnaCRM-Org/claude-plugins/tree/main/plugins/react-frontend-sdlc/skills/bats-fixture-full-validation
Command: npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill bats-fixture-full-validation-vilnacrm-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Filtered Bats runs with bats -f "pattern" can pass while the full suite fails, because duplicated helper or stub definitions in tests/bats/ silently shadow each other and only the excluded tests would catch it. This Skill enforces full-suite validation plus ShellCheck inspection before staging any fixture change. ## Core Features & Use Cases - Full-suite validation: Runs the repository's Bats suite target (e.g. make test-bats) instead of a filtered subset before staging helper, stub, or fixture edits. - Shadowing detection via ShellCheck: Interprets SC2329 (function never invoked) on an obviously-used helper as the signal that a later duplicate definition shadows the first. - Duplicate resolution guidance: Directs merging or deleting duplicate definitions rather than relying on definition order. - Use Case: After adding a second command stub next to an existing one in tests/bats/test_helper.bash, run the full suite and shell-lint target to confirm no test picks up the wrong stub body before committing. ## Quick Start Before staging my edits to the Bats helpers in tests/bats, run the full Bats suite and ShellCheck to confirm no duplicated helper definitions break other tests.

Frequently Asked Questions about bats-fixture-full-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my filtered Bats run pass but the full suite fails?▼

A filtered run with bats -f only executes matching tests, so tests that call a broken or shadowed helper never run. In Bash, a second definition of the same function silently replaces the first, and only the excluded callers would expose the wrong body.

How do I detect duplicate helper definitions in Bats test files?▼

Run ShellCheck over the tests/bats helper files and look for SC2329, the function-never-invoked warning. When it fires on a helper that is obviously called, a later definition of the same name shadows the first, leaving the original body dead.

What does ShellCheck SC2329 mean for Bats helpers?▼

SC2329 reports a function that is never invoked. On a helper that is plainly used in tests, it indicates a duplicate definition: the second definition overrides the first, so ShellCheck sees the original as unreachable.

Should I reorder duplicate Bats stub definitions to fix shadowing?▼

No. Reordering leaves the duplicate in place and the next edit reintroduces the bug. Delete one definition or merge both into a single function with an optional parameter for whatever differed.

When is a filtered Bats run sufficient before staging changes?▼

Only when the edit touches a single @test body and no shared helper, stub, or fixture. Any change to shared state in tests/bats requires a full suite run, since filtered runs cannot exercise the interdependencies.