run-test_skill

This skill runs project tests efficiently, supporting all tests, single files, or patterns to streamline CI and local validation.
  • TypeScript

481

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill mx-space/core --skill run-test

  • SKILL.md2.2 KB

Overview

This skill runs the project's test suite for a NestJS TypeScript codebase. It supports running all tests, a single test file by path or pattern, watch mode, and targeting specific test cases or names. It reports results and surfaces common fixes for timeouts and memory issues.

How this skill works

The skill analyzes provided arguments to decide whether to run the full suite, a specific file, or tests matching a name or pattern. If a file path is supplied it verifies existence before invoking the appropriate pnpm test command. It can also run tests in watch mode and pass Jest options like --testNamePattern and --testTimeout. After execution it collects and returns the test results and any relevant diagnostics.

When to use it

  • Run the entire test suite before merging a feature branch.
  • Execute a single controller or service test file during development.
  • Run tests matching a failing test name to reproduce and debug.
  • Use watch mode while actively developing tests for fast feedback.
  • Increase timeout or memory settings when CI flakiness or OOM occurs.

Best practices

  • Prefer running a targeted file or testNamePattern during development to save time.
  • Verify the relative path is correct (paths are resolved from apps/core by default).
  • Use watch mode (pnpm -C apps/core run test:watch) for iterative test changes.
  • Increase --testTimeout for slow E2E tests and set NODE_OPTIONS for memory-heavy runs.
  • Keep mocks and in-memory DB setup under apps/core/test/mock and helper for predictable tests.

Example use cases

  • Run all tests before release: pnpm test
  • Run one E2E file: pnpm test -- test/src/modules/post/post.controller.e2e-spec.ts
  • Run tests matching a name: pnpm test -- --testNamePattern="should create post"
  • Run watch mode for rapid TDD: pnpm -C apps/core run test:watch
  • Increase memory for flaky CI jobs: NODE_OPTIONS="--max-old-space-size=4096" pnpm test

FAQ

Pass the relative file path to pnpm test, e.g. pnpm test -- test/src/modules/post/post.controller.e2e-spec.ts; ensure the path is resolved from apps/core.

Tests time out in CI, how can I fix that?

Increase Jest timeout via pnpm test -- --testTimeout=30000 or raise NODE_OPTIONS memory limits if tests are memory intensive.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational