run-test
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.zipInstalls 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.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
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
| Suffix | Type | Description |
|---|---|---|
.spec.ts | Unit test | Test single function or class |
.e2e-spec.ts | E2E test | Test complete HTTP request flow |
Execution Steps
- Analyze arguments to determine which tests to run
- If file path specified, verify file exists first
- Execute appropriate test command
- 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| run-test (this skill) | 1 | 6mo | Review | Beginner |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| playwright-browser-automation | 29 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mx-space
View all by mx-space →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.
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.
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.
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.
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.
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.