Add CLI header integration tests and update test scripts#768
Merged
cliffhall merged 2 commits intoSep 1, 2025
Conversation
- Introduced integration tests for header functionality in a new script `cli-header-tests.js`. - Updated the `package.json` to include the new test script and modified the existing test command to run all tests. - Adjusted the main CLI exit behavior to ensure proper termination in CI environments. - Added `.claude/settings.local.json` to `.gitignore` to prevent local settings from being tracked.
philfreo
reviewed
Aug 29, 2025
| // Let Node.js naturally exit instead of force-exiting | ||
| // process.exit(0) was causing stdout truncation | ||
| // Explicitly exit to ensure process terminates in CI | ||
| process.exit(0); |
Contributor
There was a problem hiding this comment.
Unless it was fixed in some other way, this will re-introduce truncation of tools output on the CLI for MCP servers with a lot of tools. Being able to get tools listed out from this package on CLI (and e.g. pump them to into jq) was my entire motivation for #716.
Member
Author
There was a problem hiding this comment.
Hi @philfreo , this PR was also merged which wraps process.stdout.write() in a Promise: https://github.com/modelcontextprotocol/inspector/pull/754/files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
cli-header-tests.js.package.jsonto include the new test script and modified the existing test command to run all tests.(Also added
.claude/settings.local.jsonto.gitignoreto prevent local Claude Code settings from being tracked.)How Has This Been Tested?
Ran tests locally and in CI
Breaking Changes
No
Types of changes
Checklist