Skip to content

Conversation

@baltiyal
Copy link
Contributor

@baltiyal baltiyal commented Jul 29, 2025

This pull request introduces several enhancements to the Cosmos SDK module, focusing on adding test utilities, type definitions, and dependencies for streamlined testing and development. The most significant changes include the addition of utility functions for test data generation, comprehensive type definitions for test data structures, and updates to the package dependencies.

Additions to test utilities and type definitions:

  • Test data generators: Introduced generateAddresses, generateTxIds, generateCoinAmounts, and other functions in test/testUtils/generators.ts to simplify the creation of test data for Cosmos SDK-based coins. These functions handle common test scenarios like generating addresses, transaction IDs, and coin amounts.
  • Type definitions: Added test/testUtils/types.ts to define interfaces for test data structures, including ChainConfig, TestTransaction, TestAddresses, TestCoinAmounts, and others. These types ensure consistency and clarity in test data usage.

Updates to package dependencies:

  • Dependencies and devDependencies: Updated package.json to include new dependencies like @bitgo/sdk-api, @cosmjs/encoding, and @bitgo/sdk-test, which are essential for Cosmos SDK functionality and testing.

Utility functions for test data management:

  • Test data utilities: Added functions in test/testUtils/utils.ts for managing test data, such as getAvailableTestCoins, getTestData, and getAllTestData. These utilities streamline the loading and usage of test data across the test suite.

Simplified exports for test utilities:

  • Centralized exports: Created test/testUtils/index.ts to re-export all test utility modules (types, generators, utils), providing a single entry point for accessing test utilities.

TICKET: COIN-4990

@baltiyal baltiyal force-pushed the COIN-4990-generic-tests-cosmos-module branch 13 times, most recently from 4d734e0 to 6d00207 Compare July 29, 2025 14:54
Copy link
Contributor

@gianchandania gianchandania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments

@baltiyal baltiyal force-pushed the COIN-4990-generic-tests-cosmos-module branch 5 times, most recently from 37db72b to b9c45d2 Compare July 30, 2025 08:20
@baltiyal baltiyal marked this pull request as ready for review July 30, 2025 08:29
@baltiyal baltiyal requested a review from a team as a code owner July 30, 2025 08:29
gianchandania
gianchandania previously approved these changes Jul 30, 2025
@baltiyal baltiyal force-pushed the COIN-4990-generic-tests-cosmos-module branch from b9c45d2 to b181c59 Compare July 30, 2025 12:18
@baltiyal baltiyal merged commit d9b8eea into master Jul 30, 2025
12 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.

3 participants