This document provides an overview of the test suite, how to run tests, and documentation of skipped tests with their justifications.
The test suite contains:
- 1474+ passing tests across unit, integration, and E2E test categories
- 20 skipped tests (documented with justifications below)
- 0 failing tests (required for production release)
| Category | Description | Location |
|---|---|---|
| Unit Tests | Test individual components in isolation | src/__tests__/unit/ |
| Integration Tests | Test service layer interactions | src/__tests__/integration/ |
| E2E Tests | Test full MCP server and stdio transport | src/__tests__/e2e/ |
npm test# Unit tests only
npm test -- --testPathPattern="unit"
# Integration tests only
npm test -- --testPathPattern="integration"
# E2E tests only
npm test -- --testPathPattern="e2e"
# Specific test file
npm test -- --testPathPattern="stdio-transport"npm run test:watchnpm run test:coverageThe following tests are intentionally skipped due to their requirements for real external resources.
These tests require real GitHub API credentials (GITHUB_TOKEN, GITHUB_OWNER, GITHUB_REPO) because they make actual API calls to create/modify GitHub resources.
| Test Suite | Location | Tests Skipped | Reason |
|---|---|---|---|
| GitHub Project Manager E2E | src/__tests__/e2e/github-project-manager.e2e.ts |
7 | Creates real roadmaps, milestones, issues, and sprints |
| Resource Management E2E | src/__tests__/e2e/resource-management.e2e.ts |
6 | Tests resource lifecycle with real GitHub API |
| Metrics and Reporting E2E | src/__tests__/e2e/metrics-reporting.e2e.ts |
5 | Creates real milestones and issues for metrics testing |
| Test Suite | Location | Tests Skipped | Reason |
|---|---|---|---|
| GitHubProjectManager Integration | src/__tests__/integration/GitHubProjectManager.test.ts |
2 | Conditionally skipped when GITHUB_TOKEN is not set |
To run the normally-skipped E2E tests with real GitHub credentials:
export GITHUB_TOKEN="your-github-token"
export GITHUB_OWNER="your-github-username-or-org"
export GITHUB_REPO="your-test-repository"The E2E test files use describe.skip to skip tests by default. To run them:
- Edit the test file and change
describe.skiptodescribe - Run the tests:
npm test -- --testPathPattern="github-project-manager" - Remember to revert the change after testing
Warning: These tests will create real resources in your GitHub repository. Use a dedicated test repository.
Integration tests automatically run when GITHUB_TOKEN is set:
GITHUB_TOKEN=your-token npm test -- --testPathPattern="GitHubProjectManager"src/__tests__/
├── e2e/ # End-to-end tests
│ ├── github-project-manager.e2e.ts # [SKIPPED] Real GitHub API
│ ├── resource-management.e2e.ts # [SKIPPED] Real GitHub API
│ ├── metrics-reporting.e2e.ts # [SKIPPED] Real GitHub API
│ ├── mcp-protocol-compliance.e2e.ts # Spawns real server process
│ ├── mcp-server-integration.e2e.ts # Spawns real server process
│ └── stdio-transport.e2e.ts # Spawns real server process
├── integration/ # Service integration tests
│ └── GitHubProjectManager.test.ts # [CONDITIONAL] Needs GITHUB_TOKEN
├── unit/ # Unit tests
│ ├── application/ # Application layer tests
│ ├── domain/ # Domain model tests
│ ├── infrastructure/ # Infrastructure tests
│ └── services/ # Service tests
└── test-utils/ # Test utilities and mocks
- Node.js 22+
npm installcompletednpm run buildcompleted (for E2E tests that spawn server)
The MCP server E2E tests (stdio-transport.e2e.ts, mcp-protocol-compliance.e2e.ts) spawn a real server process and communicate via stdio. They require:
- A successful build (
npm run build) - No port conflicts
- Sufficient test timeout (15-30 seconds)
- Valid
GITHUB_TOKENwith repo permissions GITHUB_OWNERset to your username or organizationGITHUB_REPOset to a test repository
E2E tests have extended timeouts (10-30 seconds) because they spawn real processes. If tests still timeout:
# Increase Jest timeout globally
npm test -- --testTimeout=60000Error: Server build not found. Run `npm run build` first.
Solution: Run npm run build before running E2E tests.
Jest did not exit one second after the test run has completed.
This warning appears with E2E tests that spawn processes. Use --forceExit if needed:
npm test -- --forceExitnpm test -- --detectOpenHandles- AI Features Testing Guide - Detailed testing guide for AI-powered features
- E2E Testing Guide - Comprehensive E2E testing documentation
- API Reference - API documentation for all tools
Before each production release, verify:
- All tests pass:
npm testshows 0 failed tests - Build succeeds:
npm run buildcompletes without errors - Type check passes:
npm run type-check(if available) or build includes type checking - Skipped tests documented: All skipped tests have documented justification (this file)
Current status: Ready for release (1474 passing, 0 failed, 20 skipped with justification)