Skip to content

Add tests to remaining operations/ files#921

Merged
quietbits merged 14 commits intotypescript-migrationfrom
tsm-operations-tests
Mar 10, 2026
Merged

Add tests to remaining operations/ files#921
quietbits merged 14 commits intotypescript-migrationfrom
tsm-operations-tests

Conversation

@quietbits
Copy link
Contributor

No description provided.

@quietbits quietbits linked an issue Mar 9, 2026 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Size Change: 0 B

Total Size: 3.6 MB

ℹ️ View Unchanged
Filename Size
dist/stellar-base.js 2.65 MB
dist/stellar-base.min.js 945 kB

compressed-size-action

Copy link

Copilot AI left a 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 migrates the classic Mocha-based test file test/unit/operations/classic_ops_test.js into individual, type-safe Vitest TypeScript test files, and adds new coverage for Operation utility methods. It's part of an ongoing effort to modernize the test suite.

Changes:

  • Deletes the monolithic classic_ops_test.js file (1,678 lines of Mocha JS tests)
  • Adds 11 new per-operation TypeScript test files under test/unit/operations/
  • Adds a new test/unit/operation.test.ts covering _checkUnsignedIntValue, isValidAmount, _fromXDRAmount, _toXDRAmount, _fromXDRPrice, and _toXDRPrice

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/unit/operations/classic_ops_test.js Deleted — all coverage migrated to per-operation TS files
test/unit/operations/revoke_sponsorship.test.ts New tests for all 7 revoke-sponsorship operations; adds new edge-case coverage
test/unit/operations/path_payment_strict_send.test.ts New tests for pathPaymentStrictSend including muxed account support
test/unit/operations/manage_sell_offer.test.ts New tests for manageSellOffer with all price types and source account
test/unit/operations/manage_buy_offer.test.ts New tests for manageBuyOffer with all price types and source account
test/unit/operations/liquidity_pool_deposit.test.ts New tests for liquidityPoolDeposit with all price types and source account
test/unit/operations/create_passive_sell_offer.test.ts New tests for createPassiveSellOffer with multiple price types
test/unit/operations/create_claimable_balance.test.ts New tests for createClaimableBalance including all validation cases
test/unit/operations/clawback_claimable_balance.test.ts New tests for clawbackClaimableBalance including validation and source account
test/unit/operations/claim_claimable_balance.test.ts New tests for claimClaimableBalance including validation and source account
test/unit/operations/change_trust.test.ts New tests for changeTrust with Asset, LiquidityPoolAsset, and validation
test/unit/operations/bump_sequence.test.ts New tests for bumpSequence with enhanced error message assertions
test/unit/operation.test.ts New tests for Operation utility methods not tied to a specific operation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@quietbits quietbits requested a review from Ryang-21 March 9, 2026 18:45
@quietbits quietbits merged commit 312c15e into typescript-migration Mar 10, 2026
6 checks passed
@quietbits quietbits deleted the tsm-operations-tests branch March 10, 2026 12:42
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.

Add missing tests to operations/ files

3 participants