Skip to content

Commit e5dbdca

Browse files
cliffhallclaude
andcommitted
test(test-servers): export MCP_APP_DEMO_URI, dedupe in integration test
Address code-review DRY note on PR #1587: MCP_APP_DEMO_URI was defined in both the fixture and the integration test. Export it from the fixture and import it in the test so the two stay in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
1 parent 0d50b90 commit e5dbdca

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎clients/web/src/test/integration/mcp/mcp-app-demo.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import {
77
createTestServerInfo,
88
createMcpAppDemoTool,
99
createMcpAppDemoResource,
10+
MCP_APP_DEMO_URI,
1011
} from "@modelcontextprotocol/inspector-test-server";
1112
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
1213

13-
const MCP_APP_DEMO_URI = "ui://demo/widget.html";
14-
1514
/**
1615
* Exercises the `mcp_app_demo` preset added in #1557 end-to-end: it confirms the
1716
* `_meta` plumbing through the composable test server's tool/resource

‎test-servers/src/test-server-fixtures.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,8 @@ export function createArgsPrompt(
754754
};
755755
}
756756

757-
const MCP_APP_DEMO_URI = "ui://demo/widget.html";
757+
/** Canonical URI for the {@link createMcpAppDemoResource} UI resource, referenced by {@link createMcpAppDemoTool}'s `_meta.ui.resourceUri`. Exported so tests can assert against it without redefining the literal. */
758+
export const MCP_APP_DEMO_URI = "ui://demo/widget.html";
758759

759760
/**
760761
* Minimal MCP App widget that exercises the host-side UI protocol surface

0 commit comments

Comments
 (0)