Files
stonks-oracle/.kiro/hooks/run-tests-on-save.md
T

810 B

name, description, version, trigger
name description version trigger
Run Tests on Save Run relevant tests when service or frontend files are saved 2.0
type filePattern
onSave {services/**/*.py,frontend/src/**/*.{ts,tsx}}

When a file is saved:

  1. If it's a Python file under services/:

    • Identify the service module (e.g. services/ingestion/worker.pyingestion)
    • Look for corresponding tests in tests/ matching the service name
    • Run python -m pytest tests/test_{service_name}*.py -x --tb=short -q if test files exist
    • If no specific test file exists, run lint check only
    • Report results concisely
  2. If it's a TypeScript/React file under frontend/src/:

    • Run npx vitest --run from the frontend/ directory
    • Report results concisely — only show failures or a one-line success