Skip to content

Commit

Permalink
Ensure all types are exported in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-agarwal-coinbase committed Sep 23, 2024
1 parent 4c88584 commit 60e4696
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 21 deletions.
47 changes: 26 additions & 21 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
export * from "./coinbase/coinbase";
export * from "./coinbase/wallet";
export * from "./coinbase/address";
export * from "./coinbase/asset";
export * from "./coinbase/balance";
export * from "./coinbase/balance_map";
export * from "./coinbase/constants";
export * from "./coinbase/errors";
export * from "./coinbase/faucet_transaction";
export * from "./coinbase/server_signer";
export * from "./coinbase/trade";
export * from "./coinbase/transaction";
export * from "./coinbase/transfer";
export * from "./coinbase/types";
export * from "./coinbase/address/external_address";
export * from "./coinbase/address/wallet_address";
export * from "./coinbase/staking_operation";
export * from "./coinbase/staking_reward";
export * from "./coinbase/staking_balance";
export * from "./coinbase/validator";
export * from "./coinbase/webhook";
export * from "./coinbase/smart_contract";
export * from "./coinbase/payload_signature";
export * from "./coinbase/hash";
export * from './coinbase/api_error';
export * from './coinbase/asset';
export * from './coinbase/authenticator';
export * from './coinbase/balance';
export * from './coinbase/balance_map';
export * from './coinbase/coinbase';
export * from './coinbase/constants';
export * from './coinbase/contract_event';
export * from './coinbase/contract_invocation';
export * from './coinbase/errors';
export * from './coinbase/faucet_transaction';
export * from './coinbase/hash';
export * from './coinbase/historical_balance';
export * from './coinbase/payload_signature';
export * from './coinbase/server_signer';
export * from './coinbase/smart_contract';
export * from './coinbase/staking_balance';
export * from './coinbase/staking_operation';
export * from './coinbase/staking_reward';
export * from './coinbase/trade';
export * from './coinbase/transaction';
export * from './coinbase/transfer';
export * from './coinbase/types';
export * from './coinbase/validator';
export * from './coinbase/wallet';
export * from './coinbase/webhook';
39 changes: 39 additions & 0 deletions src/tests/index_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// test/index.test.ts
import * as index from "../index";

describe('Index file exports', () => {
it('should export all modules correctly', () => {
expect(index).toBeDefined();
expect(index).toHaveProperty('Address');
expect(index).toHaveProperty('APIError');
expect(index).toHaveProperty('Asset');
expect(index).toHaveProperty('Balance');
expect(index).toHaveProperty('BalanceMap');
expect(index).toHaveProperty('Coinbase');
expect(index).toHaveProperty('ContractEvent');
expect(index).toHaveProperty('ContractInvocation');
expect(index).toHaveProperty('ExternalAddress');
expect(index).toHaveProperty('FaucetTransaction');
expect(index).toHaveProperty('GWEI_DECIMALS');
expect(index).toHaveProperty('HistoricalBalance');
expect(index).toHaveProperty('InvalidAPIKeyFormatError');
expect(index).toHaveProperty('PayloadSignature');
expect(index).toHaveProperty('ServerSigner');
expect(index).toHaveProperty('SmartContract');
expect(index).toHaveProperty('SponsoredSendStatus');
expect(index).toHaveProperty('StakeOptionsMode');
expect(index).toHaveProperty('StakingBalance');
expect(index).toHaveProperty('StakingOperation');
expect(index).toHaveProperty('StakingReward');
expect(index).toHaveProperty('Trade');
expect(index).toHaveProperty('Transaction');
expect(index).toHaveProperty('TransactionStatus');
expect(index).toHaveProperty('Transfer');
expect(index).toHaveProperty('TransferStatus');
expect(index).toHaveProperty('Validator');
expect(index).toHaveProperty('Wallet');
expect(index).toHaveProperty('WalletAddress');
expect(index).toHaveProperty('Webhook');
});
});

0 comments on commit 60e4696

Please sign in to comment.