Skip to content

@sei-js/mcp-server - Added tests for missing deployContract function#264

Merged
codebycarson merged 2 commits into
mainfrom
tests/mcp-deploy-contract
Jun 27, 2025
Merged

@sei-js/mcp-server - Added tests for missing deployContract function#264
codebycarson merged 2 commits into
mainfrom
tests/mcp-deploy-contract

Conversation

@codebycarson

@codebycarson codebycarson commented Jun 11, 2025

Copy link
Copy Markdown
Collaborator

This brings us to 100% test coverage for the entire sei-js repo!

  • Added test for missing deployContract function that was recently added
  • Removed duplicate helper function in config tests in favor of the actual exported function to get to 100% coverage

@codebycarson
codebycarson requested a review from Copilot June 11, 2025 18:33
@changeset-bot

changeset-bot Bot commented Jun 11, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 088eb9e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This comment was marked as outdated.

@codecov-commenter

codecov-commenter commented Jun 11, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (15b3e3d) to head (088eb9e).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codebycarson
codebycarson requested a review from Copilot June 11, 2025 18:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

@codebycarson
codebycarson requested a review from dssei June 11, 2025 18:49
@codebycarson codebycarson changed the title Added tests for missing deployContract function @sei-js/mcp-server - Added tests for missing deployContract function Jun 11, 2025
@codebycarson
codebycarson merged commit d3c5624 into main Jun 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants