Add small example components to component2json testdata with comprehensive test coverage#429
Conversation
…ive tests Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
|
@copilot remove testdata that are over 1MB size |
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Removed all testdata files over 1MB. Kept only:
Removed tests for the deleted large files and updated existing tests to use the smaller testdata files. All 46 tests pass. (93ac892) |
|
@copilot please make sure that the test and linter passed |
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR enhances test coverage for the component2json crate by adding compiled WASM components to testdata and creating comprehensive tests to validate JSON schema generation. The focus is on smaller components (under 1MB) to keep the repository lean while ensuring robust testing across different component types.
Key changes:
- Added 3 small WASM components to testdata: fetch-rs.wasm (755KB), brave-search-rs.wasm (238KB), and context7-rs.wasm (130KB)
- Created 4 new comprehensive test functions validating schema structure, MCP compliance, and component-specific parameters
- Updated existing tests to use testdata paths instead of examples directory
Reviewed Changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/component2json/src/lib.rs | Added 4 new test functions for testdata components, updated 2 existing tests to use testdata paths |
| CHANGELOG.md | Documented addition of comprehensive test coverage with example components |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| ### Added | ||
|
|
||
| - Comprehensive test coverage for component2json crate with example components added to testdata directory (fetch-rs, brave-search-rs, context7-rs under 1MB) to validate JSON schema generation across different language ecosystems ([#XXX](https://github.com/microsoft/wassette/pull/XXX)) |
There was a problem hiding this comment.
The placeholder '[#XXX]' should be replaced with the actual PR number before merging.
| - Comprehensive test coverage for component2json crate with example components added to testdata directory (fetch-rs, brave-search-rs, context7-rs under 1MB) to validate JSON schema generation across different language ecosystems ([#XXX](https://github.com/microsoft/wassette/pull/XXX)) | |
| - Comprehensive test coverage for component2json crate with example components added to testdata directory (fetch-rs, brave-search-rs, context7-rs under 1MB) to validate JSON schema generation across different language ecosystems ([#NNN](https://github.com/microsoft/wassette/pull/NNN)) |
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
…nsive test coverage (microsoft#429) * Initial plan * Add all example components to component2json testdata with comprehensive tests Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Remove testdata files over 1MB, keep only small components Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Fix code formatting issues Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com> --------- Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> Co-authored-by: Jiaxiao Zhou <duibao55328@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Completed: Add Example Components to component2json testdata
✅ All tests and linter pass
What Was Done:
Built all example components using
just build-examples releaseAdded 3 small WASM components to
crates/component2json/testdata/(all under 1MB):Removed large files over 1MB per feedback
Created 4 comprehensive tests in
crates/component2json/src/lib.rs:Updated existing tests to use testdata/fetch-rs.wasm instead of examples directory
Fixed code formatting to pass
cargo +nightly fmt --checkUpdated CHANGELOG.md to reflect small component focus
Test Results:
Test Coverage:
Each test verifies:
Files Changed:
crates/component2json/src/lib.rs- Added 4 new test functions, updated 2 existing tests, fixed formattingcrates/component2json/testdata/- Added 3 small WASM component files (all under 1MB)CHANGELOG.md- Documented changesStatus: COMPLETE AND READY FOR REVIEW
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.