Agent skill
testing
Stars
126
Forks
16
Install this agent skill to your Project
npx add-skill https://github.com/BA-CalderonMorales/terminal-jarvis/tree/main/.github/skills/testing
SKILL.md
Skill: Test-Driven Development
Name: testing Description: Test-driven bugfixes and testing practices Trigger: "Fix this bug", bug fixes, new features requiring tests
Test-Driven Bugfix Workflow (MANDATORY)
ALL bug fixes must follow this workflow:
- Write failing test - Reproduce the bug with a test that fails
- Verify test fails - Run
cargo testand confirm failure - Implement fix - Make minimal changes to fix the bug
- Verify test passes - Run
cargo testand confirm success - Run quality gates - clippy, fmt, full test suite
- Commit both - Test and fix together in same commit
Example Workflow
bash
# 1. Create test that reproduces bug
# tests/cli_integration_tests.rs
#[test]
fn test_tool_launch_single_enter() {
let output = launch_tool("claude");
assert!(output.prompts_count <= 1); // This will fail if 3 prompts
}
# 2. Verify failure
cargo test test_tool_launch_single_enter # Should fail
# 3. Implement fix in src/cli_logic/cli_logic_tool_execution.rs
# 4. Verify success
cargo test test_tool_launch_single_enter # Should pass
cargo test # All tests pass
# 5. Commit together
git add tests/cli_integration_tests.rs src/cli_logic/cli_logic_tool_execution.rs
git commit -m "fix(cli): streamline tool launch flow"
Test Structure
| Location | Technology | Purpose | Command |
|---|---|---|---|
tests/ |
Rust | Unit and integration tests | cargo test |
e2e/ |
TypeScript (Vitest + cli-testing-library) | End-to-end CLI tests | cd e2e && npm test |
E2E Test Setup
bash
cd e2e
npm install
npm test # Run all E2E tests
npm test -- --watch # Watch mode
Key E2E Test Files
e2e/helpers.ts- CLI rendering and spawn utilitiese2e/helpers/- ANSI parsing, layout validation, width simulatione2e/*.test.ts- Test suites (help, version, installation, themes, etc.)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
versioning
126
16
Explore
release
126
16
Explore
multi-repo
126
16
Explore
tool-config
126
16
Explore
token-budget
126
16
Explore
release-checklist
126
16
Explore
Didn't find tool you were looking for?