testing-patterns

Provides testing principles and runs unit, integration, and coverage tests for Node.js and Python projects.

41|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/DevayoshaUS/Women-scholarship --skill testing-patterns-devayoshaus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/DevayoshaUS/Women-scholarship/tree/main/hackathon-main%20%281%29/hackathon-main/.agent/skills/testing-patterns
Command: npx skills add https://github.com/DevayoshaUS/Women-scholarship --skill testing-patterns-devayoshaus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Writing and running consistent, well-structured tests is hard: teams struggle with choosing between unit, integration, and E2E tests, applying mocking correctly, and executing tests across different frameworks like Jest, Vitest, and pytest. ## Core Features & Use Cases - Testing Pattern Reference: Covers the testing pyramid, AAA pattern, mocking strategies, test data factories, naming conventions, and common anti-patterns. - Unified Test Runner: Automatically detects the project type (Node.js or Python) and framework (Jest, Vitest, pytest) and executes the correct test command. - Coverage Reporting: Runs tests with an optional --coverage flag and parses pass/fail counts into a structured JSON summary. - Use Case: Point the runner at a Node.js project using Vitest to execute the full suite with coverage and receive a parsed summary of total, passed, and failed tests. ## Quick Start Ask the AI to run the test suite with coverage for your project using the testing-patterns skill and summarize the results.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
How do I run tests with coverage in Jest or Vitest?▼

Run the test_runner.py script with the --coverage flag against your project path. It detects Jest or Vitest from package.json dependencies and executes npx jest --coverage or npx vitest run --coverage automatically.

How to choose between unit, integration, and E2E tests?▼

Use unit tests for pure functions and business logic, integration tests for APIs and database queries, and E2E tests only for critical user flows. Follow the testing pyramid: many fast unit tests, some integration tests, few slow E2E tests.

When should I mock dependencies in unit tests?▼

Mock external APIs, databases, time, randomness, and network calls to keep unit tests fast and isolated. Do not mock the code under test, pure functions, or simple in-memory dependencies.

Does the test runner support Python pytest projects?▼

Yes, the runner detects Python projects via pyproject.toml or requirements.txt and runs python -m pytest -v. With the coverage flag it executes pytest with --cov and --cov-report=term-missing.

Why does the test runner report no framework found?▼

Detection fails when the project lacks a package.json with a test script or recognized dependencies, and has no pyproject.toml or requirements.txt. Add a test script or install Jest, Vitest, or pytest to enable detection.