-
Notifications
You must be signed in to change notification settings - Fork 176
test: add tests and test tooling for MCP-UI #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ok, configure testing environment with happy-dom
…nal test file types and adjust type definitions
Pull Request Test Coverage Report for Build 20309906400Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive testing infrastructure and test coverage for the MCP-UI response augmentation feature. The changes introduce DOM testing capabilities using React Testing Library and happy-dom, along with unit and integration tests to verify UI component behavior and the MCP-UI feature implementation.
Key changes:
- Testing infrastructure setup with happy-dom environment and React Testing Library
- Unit tests for UIRegistry, useRenderData hook, and ListDatabases component
- Integration tests verifying MCP-UI feature behavior with and without the feature flag
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Adds new test configuration for UI components with happy-dom environment |
| vite.ui.config.ts | Changes generated tool module extension from .ts to .js for compatibility |
| tsconfig.test.json | New TypeScript config for test files with isolated modules support |
| tests/unit/ui/registry/registry.test.ts | Unit tests for UIRegistry functionality |
| tests/unit/ui/hooks/useRenderData.test.tsx | Unit tests for useRenderData React hook |
| tests/unit/ui/components/ListDatabases/ListDatabases.test.tsx | Unit tests for ListDatabases component |
| tests/unit/toolBase.test.ts | Extended tests for ToolBase UIResource functionality |
| tests/setupReact.ts | Setup file importing jest-dom matchers for vitest |
| tests/integration/ui/mcpUIFeature.test.ts | Integration tests for MCP-UI feature |
| package.json | Adds testing-library dependencies and moves React to devDependencies |
| eslint.config.js | Updates test file patterns to include .tsx files |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Proposed changes