- Introduced SKILL.md files for project release and running tests in the duty-teller project. - Documented the project release workflow, including steps for updating CHANGELOG, committing changes, and tagging releases. - Provided instructions for running backend (pytest) and frontend (Vitest) tests, including prerequisites and failure handling. - Enhanced user guidance for verifying changes and ensuring test coverage.
1.8 KiB
1.8 KiB
name, description
| name | description |
|---|---|
| run-tests | Runs backend (pytest) and frontend (Vitest) tests for the duty-teller project. Use when the user asks to run tests, verify changes, or run pytest/vitest. |
Run tests
When to use
- User asks to "run tests", "run the test suite", or "verify tests pass".
- After making code changes and user wants to confirm nothing is broken.
- User explicitly asks for backend tests (pytest) or frontend tests (vitest/npm test).
Backend tests (Python)
From the repository root:
pytest
If imports fail, set PYTHONPATH:
PYTHONPATH=. pytest
- Config:
pyproject.toml→[tool.pytest.ini_options](coverage onduty_teller, 80% gate, asyncio mode). - Tests live in
tests/.
Frontend tests (Next.js / Vitest)
From the repository root:
cd webapp-next && npm test
- Runner: Vitest (
vitest run); env: jsdom; React Testing Library. - Config:
webapp-next/vitest.config.ts; setup:webapp-next/src/test/setup.ts.
Running both
To run backend and frontend tests in sequence:
pytest && (cd webapp-next && npm test)
If the user did not specify "backend only" or "frontend only", run both and report results for each.
Scope
- Single file or dir:
pytest path/to/test_file.pyorpytest path/to/test_dir/. For frontend, use Vitest’s path args as per its docs (e.g. underwebapp-next/). - Verbosity: Use
pytest -vif the user wants more detail.
Failures
- Do not send raw exception strings from tests to the user; summarize failures and point to failing test names/locations.
- If pytest fails with import errors, suggest
PYTHONPATH=. pytestand ensure the venv is activated and dev deps are installed (pip install -r requirements-dev.txtorpip install -e ".[dev]").