@sei-js/mcp-server - Added tests for missing deployContract function#264
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
===========================================
+ Coverage 98.16% 100.00% +1.83%
===========================================
Files 67 67
Lines 763 763
Branches 128 128
===========================================
+ Hits 749 763 +14
+ Misses 14 0 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds tests to cover the missing deployContract function and increases overall test coverage of the project.
- Added tests for deployContract handling various scenarios (successful deployment, missing private key, missing account, failure due to no contract address, and empty args).
- Introduced tests for tools such as deploy_contract, is_contract, and check_nft_ownership.
- Updated config module tests and exported the formatPrivateKey function.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/mcp-server/src/tests/core/tools.test.ts | Added tests for deploy_contract, is_contract, and check_nft_ownership. |
| packages/mcp-server/src/tests/core/services/contracts.test.ts | New tests for deployContract covering multiple success/error cases. |
| packages/mcp-server/src/tests/core/config.test.ts | Updated imports to use the exported formatPrivateKey function. |
| packages/mcp-server/src/core/config.ts | Changed formatPrivateKey to an exported function. |
deployContract functiondeployContract function
This brings us to 100% test coverage for the entire
sei-jsrepo!deployContractfunction that was recently added