test(chore): convert mcp configure tests to unit#1398
Open
filmaj wants to merge 7 commits into
Open
Conversation
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs main (3778774) |
|---|---|---|
| Internal (raw) | 2.7 KB | - |
| Internal (gzip) | 1.0 KB | - |
| Bundled (raw) | 11.16 MB | - |
| Bundled (gzip) | 2.10 MB | - |
| Import time | 870ms | +9ms, +1.1% |
bin:sanity
| Metric | Value | vs main (3778774) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.87 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 2.20s | -23ms, -1.0% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (3778774d)
| Metric | Value | vs main (3778774) |
|---|---|---|
| Internal (raw) | 106.7 KB | - |
| Internal (gzip) | 26.7 KB | - |
| Bundled (raw) | 21.72 MB | - |
| Bundled (gzip) | 3.46 MB | - |
| Import time | 766ms | +3ms, +0.4% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (3778774d)
| Metric | Value | vs main (3778774) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
Contributor
Coverage Delta
Comparing 2 changed files against main @ Overall Coverage
|
snocorp
reviewed
Jun 29, 2026
Comment on lines
-45
to
+47
| mode: isInteractive() ? 'prompt' : 'auto', | ||
| mode: this.isUnattended() ? 'auto' : 'prompt', |
Contributor
There was a problem hiding this comment.
I think these are slightly different. Is interactive means there's a tty available and is unattended means the --yes flag was used
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.
Description
Converting more integration tests to unit. This time for the
mcp configurecode path.mcp configureCommandsrc/actions/mcp/__tests__/editorConfigs.test.tssetupMCPunit tests were added.Note
Low Risk
Production changes are limited to configure command control flow and error reporting; MCP setup behavior is unchanged aside from tests and a trivial fs import.
Overview
Replaces the large
mcp configureintegration suite with narrow unit tests that mockensureAuthenticatedandsetupMCP, and extendssetupMCP/detectAvailableEditorscoverage for scenarios that used to live in integration tests (no editors, all configured, token creation failure, parse/skip behavior).ConfigureMcpCommandnow picksautovspromptviathis.isUnattended()instead ofisInteractive(), and reports auth/setup failures throughthis.output.errorwithreturnrather thanthis.error.mockSanityCommandgains a telemetry stub so configure tests can runrun()without real tracing.detectAvailableEditorsonly switches to a namedreadFileimport (no behavior change intended).Reviewed by Cursor Bugbot for commit e40dc40. Bugbot is set up for automated code reviews on this repo. Configure here.