Executes project-specific test suites, allowing for full runs, single file execution, or pattern-based test selection.

Install

mkdir -p .claude/skills/run-test && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4291" && unzip -o skill.zip -d .claude/skills/run-test && rm skill.zip

Installs to .claude/skills/run-test

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run tests. Supports running all tests, single file, or pattern-matched tests.
77 charsno explicit “when” trigger
Beginner

Key capabilities

  • Run all project tests
  • Execute specific test files
  • Run tests in watch mode
  • Filter tests by name pattern

How it works

It analyzes provided arguments to trigger pnpm test commands, supporting unit tests and E2E tests with optional watch mode and timeout adjustments.

Inputs & outputs

You give it
Test file path or name pattern
You get back
Test execution results

When to use run-test

  • Running all project tests
  • Executing a specific E2E test file
  • Running tests in watch mode
  • Filtering tests by name pattern

About this skill

Run Tests

Run project tests. Arguments: $ARGUMENTS

Test Commands

Run All Tests

pnpm test

Run Single Test File

# Using relative path (from apps/core directory)
pnpm test -- test/src/modules/post/post.controller.e2e-spec.ts

# Using filename pattern
pnpm test -- --testNamePattern="PostController"

Watch Mode

pnpm -C apps/core run test:watch

Run Specific Test Case

# Match test name
pnpm test -- --testNamePattern="should create post"

Test Directory Structure

apps/core/test/
├── src/
│   ├── modules/           # Module tests
│   │   ├── post/
│   │   │   ├── post.controller.e2e-spec.ts
│   │   │   └── post.e2e-mock.db.ts
│   │   ├── user/
│   │   │   ├── user.controller.spec.ts
│   │   │   ├── user.controller.e2e-spec.ts
│   │   │   └── user.service.spec.ts
│   │   └── ...
│   ├── utils/             # Utility tests
│   ├── processors/        # Processor tests
│   └── transformers/      # Transformer tests
├── helper/                # Test helpers
├── mock/                  # Mock implementations
└── setup-global.ts        # Global setup

Test Types

SuffixTypeDescription
.spec.tsUnit testTest single function or class
.e2e-spec.tsE2E testTest complete HTTP request flow

Execution Steps

  1. Analyze arguments to determine which tests to run
  2. If file path specified, verify file exists first
  3. Execute appropriate test command
  4. Report test results

Common Issues

Test Timeout

Increase timeout:

pnpm test -- --testTimeout=30000

Memory Issues

Tests use in-memory database. If memory issues occur:

NODE_OPTIONS="--max-old-space-size=4096" pnpm test

Run Only Failed Tests

pnpm test -- --reporter=verbose

When not to use it

  • Non-TypeScript projects
  • Projects not using pnpm

Prerequisites

pnpmNode.js environment

Limitations

  • Requires pnpm environment
  • Memory limits may require configuration

How it compares

It provides a unified interface for running different test types (unit vs E2E) based on file suffixes.

Compared to similar skills

run-test side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
run-test (this skill)16moReviewBeginner
dependency-upgrade265moReviewIntermediate
chrome-devtools417moReviewIntermediate
playwright-browser-automation297moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

chrome-devtools

mrgoonie

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

41157

playwright-browser-automation

lackeyjb

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.

29146

nestjs-expert

davila7

Nest.js framework expert specializing in module architecture, dependency injection, middleware, guards, interceptors, testing with Jest/Supertest, TypeORM/Mongoose integration, and Passport.js authentication. Use PROACTIVELY for any Nest.js application issues including architecture decisions, testing strategies, performance optimization, or debugging complex dependency injection problems. If a specialized expert is a better fit, I will recommend switching and stop.

3758

zod-4

prowler-cloud

Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.

1260

develop-ai-functions-example

vercel

Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support, demonstrate features, or create test fixtures.

536

Search skills

Search the agent skills registry