AgentSkillsCN

run-tests

项目专用测试执行命令。针对您的项目进行定制。

SKILL.md
--- frontmatter
name: run-tests
description: Project-specific test execution commands. Customize for your project.
allowed-tools: Bash

Run Tests Skill (Project-Specific)

CUSTOMIZE THIS FILE FOR YOUR PROJECT.

Quick Reference

bash
# TypeScript/JavaScript (bun)
bun test
bun test path/to/test.ts

# Python (uv)
uv run pytest
uv run pytest tests/test_specific.py -v

Test Commands

TypeScript/JavaScript (Bun)

bash
# Run all tests
bun test

# Run specific test file
bun test src/components/Button.test.ts

# Run tests matching pattern
bun test --grep "should handle"

# Run with coverage
bun test --coverage

Python (UV + pytest)

bash
# Run all tests
uv run pytest

# Run specific test file
uv run pytest tests/test_api.py

# Run with verbose output
uv run pytest -v

# Run with coverage
uv run pytest --cov=src

Expected Output

Tests should exit with:

  • Exit code 0 = All tests passed
  • Exit code 1 = Tests failed

Integration with Self-Test

When implementing, follow this pattern:

code
1. Write code
2. Write tests for the code
3. Run: bun test (or uv run pytest)
4. If tests fail → fix code
5. If tests pass → continue