원클릭으로
run-test
Run tests. Supports running all tests, single file, or pattern-matched tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run tests. Supports running all tests, single file, or pattern-matched tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when an agent must inspect, draft, validate, edit, publish, unpublish, delete, or configure mx-space content through packages/cli or the mxs binary.
Use when releasing mx-core server (apps/core), @mx-space/api-client, or @mx-space/cli (mxs) — version bump, changelog, git tag, Docker build, GitHub Release, and Dokploy redeploy. Triggers on "发版", "release a new version", "cut a release", "bump version", "publish api-client", "publish cli", "release mxs".
Author and review Drizzle SQL migrations safely for rolling deploys. Triggers when editing apps/core/src/database/schema/*.ts or apps/core/src/database/migrations/*.sql, when the user runs drizzle-kit generate, when "lint-migrations" reports a violation, or on prompts like "迁移", "改 schema", "alter table", "add a column", "drop column", "migration safety". Enforces the expand-contract pattern because mx-core ships rolling deploys (Dokploy, 2 replicas) where new and old pods coexist for tens of seconds during cutover.
MX Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
Create E2E test file for a specified module. Use when adding end-to-end tests for controllers or unit tests for services and repositories.
Create a new NestJS module with repository, service, controller, schema, and Drizzle table definition. Use when adding new feature modules, API endpoints, or business domains.
| name | run-test |
| description | Run tests. Supports running all tests, single file, or pattern-matched tests. |
| argument-hint | ["file-path|pattern"] |
| disable-model-invocation | true |
| allowed-tools | Bash(pnpm test*), Bash(cd *), Read, Glob |
Run project tests. Arguments: $ARGUMENTS
pnpm test
# 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"
pnpm -C apps/core run test:watch
# Match test name
pnpm test -- --testNamePattern="should create post"
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
| Suffix | Type | Description |
|---|---|---|
.spec.ts | Unit test | Test single function or class |
.e2e-spec.ts | E2E test | Test complete HTTP request flow |
Increase timeout:
pnpm test -- --testTimeout=30000
Tests use in-memory database. If memory issues occur:
NODE_OPTIONS="--max-old-space-size=4096" pnpm test
pnpm test -- --reporter=verbose