running-tests

Run and diagnose backend pytest and frontend Vitest suites with CI-equivalent commands.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/ragappv3 --skill running-tests-zaxbyhub
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: running-tests
Source: https://github.com/ZaxbyHub/ragappv3/tree/main/.opencode/skills/running-tests
Command: npx skills add https://github.com/ZaxbyHub/ragappv3 --skill running-tests-zaxbyhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running tests in this repo is error-prone: CI runs only a narrow backend subset, the frontend lint gate fails on a single warning, and Python 3.12+ interpreters produce misleading event-loop errors. This Skill provides the exact commands to execute, scope, and diagnose tests so local runs match CI behavior. ## Core Features & Use Cases - Targeted Test Execution: Run single files, classes, methods, or keyword-filtered subsets for both pytest (backend) and Vitest (frontend). - CI-Equivalent Local Runs: Reproduce the exact CI invocations, including ruff, typecheck, zero-warning lint, API smoke subset, and quality-contract scripts. - Failure Diagnosis: Read CI failure logs via gh CLI or GitHub MCP tools, confirm pre-existing failures with a git worktree, and recover from truncated output. - Use Case: A backend change touches tag routes — run pytest -q tests/test_tags_routes.py plus the CI subset and ruff before pushing, avoiding a red CI job. ## Quick Start Ask the assistant to run the tests for the file you just changed and reproduce the CI checks locally before pushing.

Frequently Asked Questions about running-tests

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

FAQPage Schema
How do I run a single pytest test file or method?▼

Run pytest from the backend directory with the file path, optionally appending ::ClassName::test_method to target one test. Use -k with keywords to filter across files, and -x --tb=line -q for a fast failure-focused loop.

How do I run Vitest tests for a single frontend file?▼

From the frontend directory, pass the file after a double dash: npm test -- src/lib/api.test.ts. Use -t with a name pattern to filter by test title, and npm run test:watch for local watch mode.

Why do backend tests fail with 'no current event loop' on Python 3.12?▼

This RuntimeError is a local-interpreter artifact, not a regression. CI pins Python 3.11, and newer interpreters removed the implicit event loop the test harness relies on. Use a Python 3.11 virtualenv and never patch production code for it.

Does a green CI run mean all backend tests pass?▼

No. CI runs only a narrow targeted pytest subset plus ruff, not the whole backend suite. Always also run the tests covering the area you changed locally before pushing.

Why does CI fail on a single eslint warning?▼

The frontend lint script uses --max-warnings 0, making every warning a hard failure. Fix the warning rather than suppressing it, and run npm run lint locally before pushing.

How do I confirm a test failure is pre-existing and not mine?▼

Create a git worktree at origin/master and run the same test there without touching your working tree. If it fails on master too, it is pre-existing; if it fails only on your branch, you introduced it.