run-test
community[skill]
Run tests. Supports running all tests, single file, or pattern-matched tests.
$
/plugin install coredetails
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
technical
- github
- mx-space/core
- stars
- 530
- license
- NOASSERTION
- contributors
- 33
- last commit
- 2026-05-29T06:39:36Z
- file
- .claude/skills/run-test/SKILL.md