Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bf3e765
Pinned server-everything, fixed all tests to work with current pinned…
BobDickinson Jan 14, 2026
5eec809
First working vitest implementation
BobDickinson Jan 15, 2026
395de2a
Refactoring some single-use configs fixtures and into the refeencing …
BobDickinson Jan 15, 2026
20292b1
No tests refere to server-everything (or any other server from a regi…
BobDickinson Jan 15, 2026
f57bc30
Removed server-everything dep from CI, minor cleanup
BobDickinson Jan 15, 2026
5ee7d77
Addressed Claude PR review comments: Added tsx dev dependency, beefed…
BobDickinson Jan 15, 2026
255c06f
Made both stdio and http test servers fully composable, cleaned up ty…
BobDickinson Jan 16, 2026
12b9b4f
Add TUI integration design document
BobDickinson Jan 18, 2026
493cc08
First integration of TUI (runnable from cli, no shared code)
BobDickinson Jan 18, 2026
b0b5bea
Major refactor around InspectorClient (not complete)
BobDickinson Jan 19, 2026
2dd4755
Refactored MCP code into mcp folder with it's own types file.
BobDickinson Jan 19, 2026
ed44d5f
Cleaned up barrel exports, removed inadventantly committed build files.
BobDickinson Jan 19, 2026
fa9403d
Cleaned up barrel exports
BobDickinson Jan 19, 2026
870cd37
Fixed data state clearing in InspectorClient, made it only source of …
BobDickinson Jan 19, 2026
863a146
Phase 2 complete (moved shared code from CLI and TUI to top level (st…
BobDickinson Jan 19, 2026
824e687
Integrate shared code as a workspace package, updating CLI and TUI to…
BobDickinson Jan 20, 2026
3066e8e
Refactor CLI to utilize InspectorClient for MCP interactions, replaci…
BobDickinson Jan 20, 2026
72bb071
Refactor CLI to fully utilize InspectorClient methods for all MCP ope…
BobDickinson Jan 20, 2026
4e5edb2
Refactor InspectorClient to extend EventTarget instead of EventEmitte…
BobDickinson Jan 20, 2026
46b27f2
Update CLI workflow to build shared package and adjust build commands…
BobDickinson Jan 20, 2026
379b29a
Finalized shared architecture doc.
BobDickinson Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/cli_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
cd ..
npm ci --ignore-scripts

- name: Build CLI
run: npm run build
- name: Build shared package
working-directory: .
run: npm run build-shared

- name: Explicitly pre-install test dependencies
run: npx -y @modelcontextprotocol/server-everything --help || true
- name: Build CLI
working-directory: .
run: npm run build-cli

- name: Run tests
run: npm test
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ client/dist
client/tsconfig.app.tsbuildinfo
client/tsconfig.node.tsbuildinfo
cli/build
tui/build
shared/build
test-output
tool-test-output
metadata-test-output
Expand Down
44 changes: 44 additions & 0 deletions cli/__tests__/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# CLI Tests

## Running Tests

```bash
# Run all tests
npm test

# Run in watch mode (useful for test file changes; won't work on CLI source changes without rebuild)
npm run test:watch

# Run specific test file
npm run test:cli # cli.test.ts
npm run test:cli-tools # tools.test.ts
npm run test:cli-headers # headers.test.ts
npm run test:cli-metadata # metadata.test.ts
```

## Test Files

- `cli.test.ts` - Basic CLI functionality: CLI mode, environment variables, config files, resources, prompts, logging, transport types
- `tools.test.ts` - Tool-related tests: Tool discovery, JSON argument parsing, error handling, prompts
- `headers.test.ts` - Header parsing and validation
- `metadata.test.ts` - Metadata functionality: General metadata, tool-specific metadata, parsing, merging, validation

## Helpers

The `helpers/` directory contains shared utilities:

- `cli-runner.ts` - Spawns CLI as subprocess and captures output
- `test-mcp-server.ts` - Standalone stdio MCP server script for stdio transport testing
- `instrumented-server.ts` - In-process MCP test server for HTTP/SSE transports with request recording
- `assertions.ts` - Custom assertion helpers for CLI output validation
- `fixtures.ts` - Test config file generators and temporary directory management

## Notes

- Tests run in parallel across files (Vitest default)
- Tests within a file run sequentially (we have isolated config files and ports, so we could get more aggressive if desired)
- Config files use `crypto.randomUUID()` for uniqueness in parallel execution
- HTTP/SSE servers use dynamic port allocation to avoid conflicts
- Coverage is not used because much of the code that we want to measure is run by a spawned process, so it can't be tracked by Vitest
- /sample-config.json is no longer used by tests - not clear if this file serves some other purpose so leaving it for now
- All tests now use built-in MCP test servers, there are no external dependencies on servers from a registry
Loading