Add test coverage for plugin component registration and configuration#44
Merged
Add test coverage for plugin component registration and configuration#44
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Contributor
|
@copilot 从主分支更新代码并解决冲突 |
Copilot
AI
changed the title
[WIP] Add test cases for plugin design
Add test coverage for plugin component registration and configuration
Jan 14, 2026
- Merged test and test:watch scripts with type-check and lint scripts - Kept comprehensive test implementations over placeholder tests - All plugin packages now have full script support
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive test coverage for all plugin packages in the Object UI monorepo, ensuring that plugin components are properly registered with the ComponentRegistry and have correct metadata configuration.
Changes:
- Created test suites for 4 plugin packages with 31 total tests covering component registration, metadata, inputs, and default props
- Added
test:watchscript to all plugin package.json files for development convenience - Tests validate ComponentRegistry integration following the established testing patterns from the components package
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-charts/src/index.test.ts | Added 11 tests validating chart-bar and chart (advanced) component registration, metadata, inputs (enum, array), and default props |
| packages/plugin-charts/package.json | Added test:watch script for development |
| packages/plugin-markdown/src/index.test.ts | Added 5 tests validating markdown component registration, required inputs, textarea input type, and default markdown content |
| packages/plugin-markdown/package.json | Added test:watch script for development |
| packages/plugin-editor/src/index.test.ts | Added 7 tests validating code-editor registration, enum inputs for language/theme, boolean inputs, and default props |
| packages/plugin-editor/package.json | Added test:watch script for development |
| packages/plugin-kanban/src/index.test.ts | Added 8 tests validating kanban board registration, array/code inputs, default column structure, and card properties |
| packages/plugin-kanban/package.json | Added test:watch script for development |
Contributor
|
@copilot fix pnpm test |
- Changed root test script from 'pnpm -r test' to 'vitest run' - Added pretest script to build required packages before running tests - Fixes issue where individual packages couldn't find vitest locally - All 86 tests now pass successfully Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Contributor
Author
Fixed
The issue was that Commit: 10ec2d3 |
Contributor
|
✅ All checks passed!
|
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.
Design Test Cases for Plugins ✅
Completed Tasks
pnpm testcommandSummary
Successfully fixed the
pnpm testcommand to work correctly in the monorepo setup:Fix Details
pnpm -r testtovitest runto use the root's vitest installationPrevious Issues
The original
pnpm -r testapproach tried to run each package's test script individually, but vitest was only installed at the root level, causing "vitest: not found" errors in package contexts.Test Coverage by Plugin
All tests validate ComponentRegistry integration, metadata, inputs, and default props.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.